/* Cart Widget Styles */
#cartPopup {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 55;
}

@media (min-width: 768px) {
    #cartPopup {
        width: 450px;
    }
}

#cartPopup > div {
    display: flex;
    flex-direction: column;
    padding: 24px;
    height: 100%;
}

#cartPopup .cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid #E5E5E5;
}

#cartPopup .cart-header-content {
    display: flex;
    gap: 8px;
    align-items: center;
}

#cartPopup .cart-title {
    font-size: 24px;
    font-weight: bold;
    color: #1C1C1C;
}

#cartItemCount {
    width: 32px;
    height: 32px;
    background-color: #BE930B;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

#clearCartBtn {
    width: 32px;
    height: 32px;
    background-color: #BE930B;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#clearCartBtn:hover {
    background-color: #a8820a;
}

#clearCartBtn svg {
    width: 16px;
    height: 16px;
}

#closeCartPopup {
    font-size: 24px;
    color: #1C1C1C;
    transition: color 0.3s ease;
}

#closeCartPopup:hover {
    color: #BE930B;
}

#cartItemsList {
    overflow-y: auto;
    flex: 1;
    margin-bottom: 24px;
    min-height: 300px;
}

#emptyCartMessage {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 300px;
}

#emptyCartMessage p {
    font-size: 20px;
    font-weight: 500;
    color: rgba(28, 28, 28, 0.7);
}

/* Empty Cart Content Styles */
.empty-cart-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    min-height: 300px;
}

.empty-cart-text {
    font-size: 16px;
    font-weight: 500;
    color: #1C1C1C;
    margin-bottom: 8px;
}

.empty-cart-sign-in {
    font-size: 14px;
    color: #0066CC;
    margin-bottom: 20px;
    text-decoration: underline;
    cursor: pointer;
}

.empty-cart-sign-in:hover {
    color: #004499;
}

.empty-cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.empty-cart-btn {
    width: 100%;
    height: 40px;
    border: 1px solid #1C1C1C;
    background-color: transparent;
    color: #1C1C1C;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.empty-cart-btn:hover {
    background-color: #1C1C1C;
    color: white;
}

#cartPopup .cart-footer {
    border-top: 1px solid rgba(28, 28, 28, 0.1);
    padding-top: 16px;
}

#cartPopup .cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

#cartPopup .cart-total-label {
    font-size: 16px;
    font-weight: 500;
    color: #1C1C1C;
}

#cartTotal {
    font-size: 20px;
    font-weight: bold;
    color: #1C1C1C;
}

#checkoutBtn {
    width: 100%;
    height: 47px;
    background-color: #BE930B;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#checkoutBtn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#shopEbikeBtn {
    width: 100%;
    height: 47px;
    border: 1px solid #BE930B;
    background-color: transparent;
    color: #BE930B;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

#shopEbikeBtn:hover {
    background-color: #BE930B;
    color: white;
}

/* Cart Overlay */
#cartOverlay {
    position: fixed;
    inset: 0;
    background-color: black;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 50;
}

#cartOverlay.active {
    opacity: 0.5;
    pointer-events: auto;
}

/* Store Popup Styles */
#storePopup {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 50;
}

@media (min-width: 768px) {
    #storePopup {
        width: 450px;
    }
}

#storePopup > div {
    display: flex;
    flex-direction: column;
    padding: 24px;
    height: 100%;
}

#storePopup .store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid #E5E5E5;
}

#storePopup .store-title {
    font-size: 24px;
    font-weight: bold;
    color: #1C1C1C;
}

#closeStorePopup {
    font-size: 24px;
    color: #1C1C1C;
    transition: color 0.3s ease;
}

#closeStorePopup:hover {
    color: #BE930B;
}

#storePopup .store-search {
    margin-bottom: 16px;
}

#storePopup .store-search-form {
    display: flex;
    gap: 8px;
    padding: 16px 0;
}

#storeSearchInput {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

#storeSearchInput:focus {
    outline: none;
    box-shadow: 0 0 0 2px #BE930B;
}

#storeSearchBtn {
    padding: 14px 30px;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    border: 1px solid #BE930B;
    background: #BE930B;
    color: #FFF;
    text-align: center;
    text-overflow: ellipsis;
    font-family: "Proxima Nova";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

#storeSearchBtn:hover {
    background-color: white;
    color: #BE930B;
}

#storeItemsList {
    overflow-y: auto;
    flex: 1;
    margin-bottom: 24px;
    min-height: 300px;
}

#emptyStoreMessage {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 300px;
}

#emptyStoreMessage p {
    font-size: 20px;
    font-weight: 500;
    color: rgba(28, 28, 28, 0.7);
}

#storePopup .store-footer {
    border-top: 1px solid rgba(28, 28, 28, 0.1);
    padding-top: 16px;
}

#closeStoreBtn {
    width: 100%;
    height: 47px;
    border-radius: 6px;
    border: 1px solid #BE930B;
    transition: all 0.3s ease;
    color: #BE930B;
    text-align: center;
    text-overflow: ellipsis;
    font-family: "Proxima Nova";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
}

#closeStoreBtn:hover {
    background-color: #BE930B;
    color: white;
}

/* Cart Item Styles */
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(28, 28, 28, 0.1);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
}

.cart-item-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #1C1C1C;
    margin-bottom: 4px;
}

.cart-item-remove {
    color: rgba(28, 28, 28, 0.7);
    transition: color 0.3s ease;
}

.cart-item-remove:hover {
    color: #BE930B;
}

.cart-item-remove svg {
    width: 20px;
    height: 20px;
}

.cart-item-details {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.cart-item-attributes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cart-item-sku {
    font-size: 14px;
    color: rgba(28, 28, 28, 0.6);
    margin-bottom: 4px;
    white-space: pre-line;
}

.cart-item-price {
    font-size: 14px;
    color: #1C1C1C;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-quantity button {
    width: 30px;
    height: 30px;
    display: flex;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

.cart-item-quantity span {
    width: 24px;
    text-align: center;
}

/* Cart Item Elements Created by JavaScript */
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(28, 28, 28, 0.1);
}

.cart-item-image-container {
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-content {
    flex: 1;
}

.cart-item-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #1C1C1C;
    margin-bottom: 4px;
}

.cart-item-remove {
    color: rgba(28, 28, 28, 0.7);
    transition: color 0.3s ease;
}

.cart-item-remove:hover {
    color: #BE930B;
}

.cart-item-remove svg {
    width: 20px;
    height: 20px;
}

.cart-item-details {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.cart-item-attributes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cart-item-sku {
    font-size: 14px;
    color: rgba(28, 28, 28, 0.6);
    margin-bottom: 4px;
    white-space: pre-line;
}

.cart-item-price {
    font-size: 14px;
    color: #1C1C1C;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
}

.cart-item-quantity button {
    width: 30px;
    height: 30px;
    display: flex;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

/* Message Styles */
#messageContainer {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 10002;
    max-width: 400px;
    margin: 0 auto;
    pointer-events: none;
}

.message {
    padding: 16px 24px;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: messageFadeIn 0.3s ease-out;
}

.message.error {
    background-color: #fef0f0;
    border: 1px solid #fde2e2;
    color: #f56c6c;
}

.message.success {
    background-color: #f0f9eb;
    border: 1px solid #e1f3d8;
    color: #67c23a;
}

.message.info {
    background-color: #ecf5ff;
    border: 1px solid #d9ecff;
    color: #409eff;
}

.message.warning {
    background-color: #fdf6ec;
    border: 1px solid #faecd8;
    color: #e6a23c;
}

.message-content {
    flex: 1;
    font-size: 14px;
}

.message-close {
    margin-left: 10px;
    cursor: pointer;
    font-size: 14px;
}

@keyframes messageFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Store Item Styles */
.store-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(28, 28, 28, 0.1);
}

.store-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.store-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #1C1C1C;
}

.store-item-stock {
    padding: 4px 12px;
    background-color: #f0f9eb;
    color: #67c23a;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
}

.store-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.store-item-info p {
    font-size: 14px;
    color: rgba(28, 28, 28, 0.7);
}

/* Modal Styles */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    padding: 24px;
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: 8px;
}

.modal-title {
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: bold;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

/* Shipping Type Selection */
.shipping-type-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shipping-type-option {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shipping-type-option:hover {
    background-color: #f9fafb;
}

.shipping-type-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shipping-type-option-title {
    font-weight: 600;
}

.shipping-type-option-description {
    margin-top: 4px;
    font-size: 14px;
    color: #6b7280;
}

/* Address Selection */
.address-list {
    overflow-y: auto;
    margin-bottom: 16px;
    max-height: 240px;
}

.address-option {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.address-option:hover {
    background-color: #f9fafb;
}

.address-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.address-option-name {
    font-weight: 600;
}

.address-option-details p {
    margin-bottom: 4px;
    font-size: 14px;
    color: #6b7280;
}

.add-address-btn {
    width: 100%;
    padding: 8px;
    border: 1px solid #BE930B;
    color: #BE930B;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.add-address-btn:hover {
    background-color: #f5f0e6;
}

/* Store Address Selection */
.store-address-selection {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 800px;
    width: 100%;
    min-height: 70vh;
    max-height: 90vh;
}

.store-search-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.store-search-select {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.store-search-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #BE930B;
}

.store-search-input {
    flex: 2;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.store-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #BE930B;
}

.store-search-btn {
    padding: 8px 16px;
    background-color: #BE930B;
    color: white;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.store-search-btn:hover {
    background-color: #a8820a;
}

.store-list {
    margin-bottom: 16px;
}

.store-option {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-option:hover {
    background-color: #f9fafb;
}

.store-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.store-option-name {
    font-weight: 600;
}

.store-option-details p {
    margin-bottom: 4px;
    font-size: 14px;
    color: #6b7280;
}

.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pagination-info {
    font-size: 14px;
    color: #6b7280;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    padding: 4px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: #f9fafb;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button Styles */
.btn {
    padding: 10px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #BE930B;
    color: white;
}

.btn-primary:hover {
    background-color: #a8820a;
}

.btn-secondary {
    border: 1px solid #e2e8f0;
    color: #1C1C1C;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

.btn-outline {
    border: 1px solid #BE930B;
    color: #BE930B;
}

.btn-outline:hover {
    background-color: #f5f0e6;
}