
.goods-detail-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

/* SKU Modal Styles */
.sku-modal-pc {
    background-color: white;
    border-radius: 12px;
    width: clamp(320px, 80vw, 1006px); /* Adjust as per design */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 20px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#sku-view-content,
#address-view-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 5px;
}

#sku-view-content::-webkit-scrollbar,
#address-view-content::-webkit-scrollbar {
    width: 6px;
}

#sku-view-content::-webkit-scrollbar-thumb,
#address-view-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.sku-modal-pc .actions {
    flex-shrink: 0;
    margin-top: 10px;
    background-color: #fff;
    z-index: 10;
}

.sku-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.location-info {
    position: relative;
    padding-left: 22px;
    padding-right: 40px;
    line-height: 1.5;
}

.location-info img {
    width: 16px;
    height: 16px;
    position: absolute;
    left: 0;
    top: 3px;
}

.location-info span {
    font-size: 14px;
    display: inline;
    word-wrap: break-word;
}

.modify-btn {
    background: none;
    border: none;
    color: #757A87;
    cursor: pointer;
    font-size: 14px;
    background-image: url('../imgs/goods-detail/icon-editplace.svg');
    background-size: clamp(10px, 2vw, 13px) clamp(10px, 2vw, 13px);
    background-repeat: no-repeat;
    background-position: left;
    padding-left: clamp(10px, 2vw, 14px);
    display: inline-block;
    margin-left: 5px;
}

.delivery-promise {
    font-size: 12px;
    color: #999;
    margin-bottom: 20px;
    padding-left: 17px;
}

.product-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.product-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.product-price-info .price {
    font-size: 24px;
    color: #e4393c;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.product-price-info .original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.sku-selection {
    position: relative;
    margin-bottom: 20px;
}

.sku-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

.sku-options-grid {
    display: none; /* Hidden by default */
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.sku-option {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #F6F6F6;
    background-color: #F6F6F6;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: clamp(6px, 2vw, 8px);
}
.sku-option:hover {
    background-color: rgba(196, 41, 36, 0.1);
    border-color: #C42924;
    color: #C42924;
}

.sku-option img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.sku-option.active {
    background-color: rgba(196, 41, 36, 0.1);
    border-color: #C42924;
    color: #C42924;
}
.sku-options-grid .sku-option {
    flex-direction: column;
    padding: 0;
    background: unset;
    border: none;
}
.sku-options-grid .sku-option img {
    width: clamp(106px, 20vw, 147px);
    height: clamp(106px, 20vw, 147px);
    border-radius: 7px; 
    border: 1px solid transparent;
}
.sku-options-grid .sku-option:hover img {
    border: 1px solid #C42924;
}
.sku-options-grid .sku-option p {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: clamp(12px, 2vw, 16px);
}
.view-large-image {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: clamp(12px, 2vw, 14px);
    color: #666;
}
.view-large-image img{
    width: clamp(15px, 2vw, 18px);
    height: clamp(15px, 2vw, 18px);
}

.sku-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.sku-options-container {
    margin-top: 10px;
}

.sku-options-list {
    display: flex; /* Shown by default */
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.sku-option-list::-webkit-scrollbar {
    width: 4px;
}

/* Payment Method Section */
.payment-method-section {
    margin-top: 20px;
}

.payment-label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.payment-option:last-child {
    border-bottom: none;
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-info img {
    width: 24px;
    height: 24px;
}

.payment-info span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.radio-check {
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    border-radius: 50%;
    position: relative;
}

.payment-option.active .radio-check {
    background-color: #e4393c;
    border-color: #e4393c;
}

.payment-option.active .radio-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: translate(-50%, -60%) rotate(-45deg);
}

/* Submit Order Footer */
.submit-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 0 0;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.order-summary {
    font-size: 14px;
    color: #333;
}

.total-price {
    color: #e4393c;
    font-size: 18px;
    font-weight: bold;
    margin-left: 5px;
}

.submit-order-btn {
    background-color: #e4393c;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.submit-order-btn:hover {
    background-color: #d32f2f;
}
.sku-option-list-item {
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: left;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s, color 0.3s;
}

.sku-option-list-item:hover {
    border-color: #e4393c;
}

.sku-option-list-item.active {
    border-color: #e4393c;
    color: #e4393c;
    background-color: #fff0f0;
}

.sku-selection.list-view .sku-options-grid {
    display: none;
}

.sku-selection.list-view .sku-options-list {
    display: flex;
}

.sku-modal-footer {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Address View Styles */
#address-view-content {
    padding: 10px 0;
}

.address-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.address-list-header h4 {
    margin: 0;
    font-size: 16px;    
    font-weight: 600;
}


.add-new-address-btn {
    background: none;
    border: none;
    color: #e4393c;
    font-size: 14px;
    cursor: pointer;
}

.address-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 100%; /* Example max height for scrolling */
    overflow-y: auto;
}

.address-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #F6F6F6;
    padding: 15px;
    margin-bottom: 10px;
    /* cursor: pointer; */
    transition: all 0.3s ease;
    position: relative;
}

/* .address-item:hover {
    border-color: #e4393c;
    background-color: #fff0f0;
} */

.address-item:last-child {
    border-bottom: none;
}

.address-item.default {
    border: 1px solid #e4393c;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff0f0;
}

.address-details p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.address-details .address-line-2 strong {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}
.address-item.default .address-details p,.address-item.default .address-line-2 strong {
    color: #C42924;
}
.address-details .address-contact {
    font-size: 14px;
}

.default-tag {
    color: #000;
    font-size: 14px;
    margin-left: 8px;
}

.address-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.edit-btn,
.delete-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
}

.edit-btn {
    width: 22px;
    height: 22px;
    background-image: url('../imgs/goods-detail/icon-edit.svg');
    position: absolute;
    bottom: 16px;
    right: 23px;
}

.delete-btn {
    width: 15px;
    height: 15px;
    background-image: url('../imgs/goods-detail/icon-delete.svg');
    margin-bottom: 10px;
    position: absolute;
    top: 16px;
    right: 23px;
    transform: translate(-30%);
}

.add-to-cart-modal,
.buy-now-modal {
    width: 160px;
    height: 50px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}

.add-to-cart-modal {
    background-color: white;
    color: #333;
    border: 1px solid #6e6e6e;
}

.buy-now-modal {
    background-color: #C42924;
    color: white;
    border: 1px solid #C42924;
}

.product-price-info .logistics-fee {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    background-color: #F6F6F6;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 20px;
    background-image: url('../imgs/goods-detail/icon-plus.svg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}
.quantity-btn.minus {
    background-image: url('../imgs/goods-detail/icon-minus.svg');
}

.quantity-input {
    width: 50px;
    line-height: 28px;
    text-align: center;
}

.stock-info {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}


/* Default View States */
.goods-detail-content.mobile-view {
    display: none;
}

.goods-detail-content.pc-view {
    display: flex;
    gap: 20px;
}


@media (max-width: 768px) {
    /* Hide PC specific elements */
    .goods-detail-content.pc-view,
    .footer.pc,
    .header.pc,
    .breadcrumb
    {
        display: none !important;
    }
    
    /* Adapt Additional Details for Mobile */
    .product-additional-details {
        margin-top: 20px;
        padding: 0 clamp(15px, 4vw, 20px);
        background: #fff;
        padding-bottom: 80px; /* Space for footer */
    }
    
    .tab-navigation {
        overflow-x: auto;
        white-space: nowrap;
        gap: clamp(15px, 4vw, 20px);
        padding-bottom: 5px; /* Scrollbar space */
    }
    
    .tab-navigation::-webkit-scrollbar {
        display: none;
    }
    
    .tab-link {
        padding: 10px 0;
        margin-right: 10px;
        flex-shrink: 0;
    }
    
    /* Ensure Mobile View is visible */
    .goods-detail-content.mobile-view {
        display: block;
        background-color: #f5f5f5;
    }

    /* Mobile Header Nav */
    .mobile-header-nav {
        position: fixed;
        top: 110px;
        left: 0;
        right: 0;
        padding: clamp(10px, 3vw, 15px);
        display: flex;
        justify-content: space-between;
        z-index: 100;
        pointer-events: none;
    }
    .mobile-header-nav .nav-btn {
        width: clamp(32px, 8vw, 40px);
        height: clamp(32px, 8vw, 40px);
        border-radius: 100%;
        pointer-events: auto;
        cursor: pointer;
    }
    .mobile-header-nav .nav-btn.cart {
        margin-left: clamp(14px, 4vw, 18px);
    }
    .mobile-header-nav .nav-btn img {
        width: 100%;
        height: 100%;
    }

    /* Mobile Gallery */
    .mobile-gallery-container {
        position: relative;
        width: 100%;
        padding-top: 100%; /* 1:1 Aspect Ratio */
        background: #fff;
        overflow: hidden;
    }
    .mobile-gallery-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        transition: transform 0.3s ease-out;
    }
    .mobile-main-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        flex-shrink: 0;
    }
    .mobile-image-counter {
        position: absolute;
        bottom: 15px;
        right: 15px;
        background: rgba(0,0,0,0.5);
        color: white;
        padding: 2px 10px;
        border-radius: 12px;
        font-size: 12px;
    }

    /* Mobile Thumbnail List */
    .mobile-thumbnail-row {
        display: flex;
        align-items: center;
        padding: 10px clamp(15px, 4vw, 20px);
        background: #fff;
        gap: 10px;
        border-bottom: 1px solid #f5f5f5;
    }

    .mobile-thumbnail-label {
        display: flex;
        flex-direction: column;
        font-size: 12px;
        color: #999;
        flex-shrink: 0;
        line-height: 1.2;
    }

    .mobile-thumbnail-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        flex: 1;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .mobile-thumbnail-list::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera */
    }

    .mobile-thumbnail {
        width: 40px;
        height: 40px;
        border-radius: 4px;
        object-fit: cover;
        border: 1px solid transparent;
        flex-shrink: 0;
    }

    .mobile-thumbnail.active {
        border-color: #e4393c;
    }

    .mobile-thumbnail-control,
    .mobile-thumbnail-more {
        width: 20px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        cursor: pointer;
    }

    .mobile-thumbnail-control img,
    .mobile-thumbnail-more img {
        width: 16px;
        height: 16px;
    }

    /* Rotate right arrow */
    .mobile-thumbnail-more.next-btn img {
        transform: rotate(180deg);
    }

    /* Mobile Product Info */
    .mobile-product-info {
        padding: clamp(15px, 4vw, 20px);
        background: #fff;
        margin-bottom: 10px;
    }
    .mobile-price-row {
        display: flex;
        align-items: baseline;
        margin-bottom: 8px;
    }
    .mobile-price-row .currency {
        font-size: 14px;
        color: #e4393c;
        font-weight: bold;
    }
    .mobile-price-row .price {
        font-size: clamp(24px, 6vw, 32px);
        color: #e4393c;
        font-weight: bold;
        margin-right: 8px;
    }
    .mobile-price-row .original-price {
        font-size: 12px;
        color: #999;
        text-decoration: line-through;
    }
    .mobile-title {
        font-size: clamp(16px, 4vw, 22px);
        font-weight: bold;
        line-height: 1.4;
        margin-bottom: 10px;
        color: #333;
    }
    .mobile-meta-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 20px;
        font-size: 14px;
        color: #666;
        margin-top: 15px;
    }
    
    .mobile-meta-row .meta-item {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .mobile-meta-row .meta-label {
        color: #999;
    }

    .mobile-meta-row .meta-value {
        color: #333;
    }

    .mobile-meta-row .stock-status {
        color: #55a532; /* Green for In Stock */
    }

    .mobile-meta-row .brand-link {
        color: #ff6600; /* Orange for Brand */
        text-decoration: none;
    }

    /* Mobile Footer Actions Bar */
    .mobile-footer-actions-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        display: flex;
        align-items: center;
        padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 16px);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 1201; /* Higher than modal overlay */
        padding-bottom: max(clamp(8px, 2vw, 12px), env(safe-area-inset-bottom));
    }
    .action-icons {
        display: flex;
        gap: clamp(10px, 3vw, 15px);
        margin-right: clamp(10px, 3vw, 12px);
    }
    .icon-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: clamp(10px, 2.5vw, 12px);
        color: #666;
        text-decoration: none;
        cursor: pointer;
        min-width: clamp(40px, 10vw, 50px);
    }
    .icon-item img {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
        margin-bottom: 2px;
    }
    .action-buttons {
        flex: 1;
        display: flex;
        height: clamp(38px, 10vw, 44px);
        border-radius: clamp(19px, 5vw, 22px);
        overflow: hidden;
    }
    .btn-cart, .btn-buy {
        flex: 1;
        border: none;
        color: white;
        font-size: clamp(14px, 3.5vw, 16px);
        font-weight: 500;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .btn-cart {
        background: #fff;
        color: #6E6E6E;
        border: 1px solid #6E6E6E;
        border-radius: clamp(19px, 5vw, 22px) 0px 0px clamp(19px, 5vw, 22px);
    }
    .btn-buy {
        background: var(--color-primary);
    }

    /* Adapt SKU Modal for Mobile */
    .sku-modal-pc {
        display: flex !important; /* Force show if toggled */
        width: 100%;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        max-height: 80vh;
        margin: 0;
        padding: 15px;
        padding-bottom: calc(60px + env(safe-area-inset-bottom)); /* Space for footer */
        animation: slideUp 0.3s ease-out;
    }
    
    .sku-modal-pc .actions.modal,
    .sku-modal-pc .actions.submit-order-footer {
        display: none !important; /* Hide internal buttons on mobile */
    }
    
    /* Adjust internal modal styles for mobile */
    .product-summary {
        gap: 10px;
    }
    .product-thumbnail {
        width: 80px;
        height: 80px;
    }
    .product-price-info .price {
        font-size: 20px;
    }
    .sku-options-grid {
        grid-template-columns: repeat(3, 1fr); /* Fewer columns on mobile */
    }
}

.goods-gallery {
    flex: 1;
    max-width: 550px;
}

.main-image {
    position: relative;
    margin-bottom: 10px;
}

.pc-gallery-viewport {
    width: 100%;
    height: 358px;
    overflow: hidden;
    position: relative;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: grab;
}

.pc-gallery-viewport:active {
    cursor: grabbing;
}

.pc-gallery-slider {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.3s ease-out;
}

.pc-main-image-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
}

.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 14px;
}

.thumbnail-images {
    display: flex;
    gap: 20px;
    justify-content: center;
    position: relative;
}
.thumbnail-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 21px;
  height: 21px;
  left: 0;
  cursor: pointer;
  background-image: url('../imgs/goods-detail/icon-arrow-left.svg');
  background-size: contain;
  background-repeat: no-repeat;
}
.thumbnail-icon.right:hover {
  background-image: url("../imgs/goods-detail/icon-arrow-right-red.svg");
  transform: rotate(0deg) translateY(-50%);
} 
.thumbnail-icon.left:hover {
  background-image: url("../imgs/goods-detail/icon-arrow-right-red.svg");
  transform: rotate(180deg) translateY(50%);
}
.thumbnail-icon.right {
  left: auto;
  right: 0;
  transform: rotate(180deg) translateY(50%);
}

.thumbnail-images .thumbnail {
    width: 92px;
    height: 92px;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.thumbnail-images .thumbnail.active,
.thumbnail-images .thumbnail:hover {
    border-color: #e4393c;
}

.goods-info {
    flex: 1;
    padding-left: 20px;
}

.goods-title {
    font-size: clamp(1.25rem, 1.083rem + 0.83vw, 2rem); /* 20px at 768px -> 32px at 1440px */
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}

.price-section {
    margin-bottom: 15px;
    display: flex;
    align-items: baseline;
    position: relative;
}
.share-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    cursor: pointer;  
}
.current-price {
    font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2.5rem); /* 24px at 768px -> 40px at 1440px */
    color: #e4393c;
    font-weight: bold;
    margin-right: 10px;
}

.original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.product-meta {
    margin-bottom: 20px;
    color: #666;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.options-section {
    border-bottom: 1px solid #cecece;
    padding-top: 15px;
}
.sku-options-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.sku-options-grid .sku-option img {
    width: 100%;
    height: auto;
}
.option-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.option-label {
    width: 60px;
    color: #666;
    font-size: 14px;
}

.option-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-item {
    border: 1px solid #ccc;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.option-item.active {
    border-color: #e4393c;
    color: #e4393c;
    position: relative;
}

.option-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent #e4393c transparent;
}

.option-button {
    border: 1px solid #ccc;
    background-color: white;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.option-button.active,
.option-button:hover {
    border-color: #e4393c;
    color: #e4393c;
}

.actions-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.extra-actions {
    margin-top: 20px;
    display: flex;
    gap: 39px;
    font-size: 14px;
    color: #666;
}
.extra-actions-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.add-to-cart,
.buy-now {
    width: 128px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    height: 50px;
}

.add-to-cart {
    border: 1px solid #6e6e6e;
    border-radius: 31px 0px 0px 31px;
    background-color: #fff;
}

.buy-now {
    background-color: #C42924;
    color: white;
    border: 1px solid #C42924;
    border-radius: 0px 31px 31px 0px;
}

@media (max-width: 992px) {
    .goods-detail-content.pc-view {
        flex-direction: column;
    }

    .goods-gallery {
        max-width: 100%;
    }

    .goods-info {
        padding-left: 0;
    }

    }

.product-additional-details {
    margin-top: 40px;
}

.tab-navigation {
    border-bottom: 2px solid #eee;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.tab-link {
    background: none;
    border: none;
    font-size: 16px;
    padding: 10px 20px;
    cursor: pointer;
    position: relative;
    color: #666;
}

.tab-link.active {
    color: #e4393c;
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e4393c;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.detail-image {
    max-width: 100%;
    height: auto;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .detail-image {
        width: auto;
    }
}

.review-item {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.review-avatar-column {
    flex-shrink: 0;
}

.review-content-column {
    flex-grow: 1;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-name {
    font-weight: bold;
}

.review-meta {
    font-size: 12px;
    color: #999;
}

.review-body {
    margin-bottom: 10px;
}

.review-images {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.review-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.seller-reply {
    background-color: #f7f7f7;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    position: relative;
}

.toggle-reply {
    background: none;
    border: none;
    color: #e4393c;
    cursor: pointer;
    font-size: 14px;
    display: none; /* Initially hidden */
    position: absolute;
    right: 0;
    bottom: 10px;
}

@media (max-width: 768px) {
    .seller-reply .reply-text {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        padding-right: 40px; /* 为“更多”按钮留出空间 */
    }

    .seller-reply .reply-text.expanded {
        -webkit-line-clamp: unset;
        padding-right: 0;
    }

    /* Mobile Reviews Adaptation */
    .review-item {
        padding: 15px 0;
        gap: 12px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .review-header {
        /* If used in JS or future HTML updates */
        margin-bottom: 5px;
    }

    .user-info {
        display: flex;
        flex-direction: column;
        margin-bottom: 8px;
    }

    .user-name {
        font-size: 14px;
        margin-bottom: 4px;
        color: #333;
    }

    .review-meta {
        font-size: 11px;
        color: #999;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        line-height: 1.4;
    }
    
    .review-meta span {
        display: inline-block;
    }

    .review-body p {
        font-size: 14px;
        line-height: 1.5;
        margin: 5px 0 10px 0;
        color: #333;
    }

    .review-images {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 5px; /* Touch target / scrollbar space */
        margin-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .review-images::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .review-images img {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        border-radius: 6px;
    }
    
    .seller-reply {
        background-color: #f9f9f9;
        padding: 10px;
        border-radius: 6px;
        margin-top: 5px;
        font-size: 13px;
        line-height: 1.5;
    }

    /* Restore Mobile Seller Reply Toggle Logic */
    .seller-reply .reply-text {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        padding-right: 40px; /* Space for 'More' button */
    }

    .seller-reply .reply-text.expanded {
        -webkit-line-clamp: unset;
        padding-right: 0;
    }

    .seller-reply .reply-text.expanded + .toggle-reply {
        position: static;
        display: block;
        margin-top: 5px;
        text-align: right;
    }

    .toggle-reply {
        display: inline;
        position: absolute;
        bottom: 10px;
        right: 10px;
        background-color: #f9f9f9; /* Match seller-reply bg */
        padding-left: 5px;
    }
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center; /* Default to center */
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Specific alignment for the share modal */
#share-modal.visible {
    justify-content: flex-end;
    padding-right: 10vw;
}

.share-modal-pc {
    background-color: white;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.share-modal-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.share-modal-body {
    padding: 20px;
}

.share-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.share-options li {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    border-radius: 8px; /* Added for rounded corners */
    transition: background-color 0.3s, border-color 0.3s; /* Smooth transition */
}

.share-options li:hover {
    background-color: #f9f9f9; /* Light grey background on hover */
}

.share-options li:last-child {
    border-bottom: none;
}

.share-options img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.share-options span {
    flex-grow: 1;
    font-size: 16px;
}

.share-action-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    background-image: url('../imgs/goods-detail/icon-share-nobg.svg');
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 24px; /* Space for the icon */
    transition: color 0.3s, background-image 0.3s;
}

.share-action-btn:hover,
.share-action-btn:hover span {
    background-image: url('../imgs/goods-detail/icon-share-nobg-hover.svg');
    color: #C42924;
}

.share-modal-footer {
    padding: 15px 20px;
    text-align: center;
}

.cancel-button {
    background-color: #C42924;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 0;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
}

.share-modal-mobile {
    display: none;
}

@media (max-width: 768px) {
    .share-modal-pc {
        display: none !important;
    }

    /* Reset modal overlay alignment for mobile */
    #share-modal.visible {
        justify-content: center;
        align-items: flex-end;
        padding-right: 0;
    }

    .share-modal-mobile {
        display: block;
        width: 100%;
        background-color: #fff;
        border-radius: 20px 20px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
        animation: slideUp 0.3s ease-out;
    }
    
    .share-modal-mobile-content {
        padding: clamp(15px, 4vw, 20px);
    }
    
    .share-modal-mobile-header {
        position: relative;
        text-align: center;
        margin-bottom: clamp(15px, 4vw, 20px);
    }
    
    .share-modal-mobile-header h3 {
        margin: 0;
        font-size: clamp(14px, 4vw, 16px);
        color: #333;
        font-weight: normal;
    }
    
    .close-share-mobile {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: clamp(20px, 5vw, 24px);
        line-height: 1;
        color: #999;
        cursor: pointer;
        padding: 5px;
    }
    
    .share-list-mobile {
        list-style: none;
        padding: 0;
        margin: 0 0 20px 0;
    }

    .share-item-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        border-bottom: 1px solid #f5f5f5;
        cursor: pointer;
    }

    .share-item-mobile:last-child {
        border-bottom: none;
    }

    .share-item-mobile .left-content {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .share-item-mobile .share-icon-img {
        width: 24px;
        height: 24px;
    }

    .share-item-mobile .share-name {
        font-size: 14px;
        color: #333;
    }

    .share-item-mobile .right-action {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .share-item-mobile .share-text {
        font-size: 12px;
        color: #999;
    }

    .share-item-mobile .arrow-icon {
        width: 12px;
        height: 12px;
    }

    .cancel-share-mobile {
        width: 100%;
        height: 44px;
        background: #e4393c;
        border: none;
        border-radius: 22px;
        font-size: 16px;
        color: #fff;
        cursor: pointer;
        font-weight: bold;
    }
}

/* Address Form Modal Styles */
#address-form-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Higher than SKU modal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5);
}

.address-form-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.address-form-content .modal-header {
    margin-bottom: 20px;
    text-align: center;
}

.address-form-content .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.address-form-content .close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

#address-form .form-group {
    margin-bottom: 15px;
}

#address-form .form-row {
    display: flex;
    gap: 15px;
}

#address-form .half-width {
    flex: 1;
}

#address-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

#address-form label.required::before {
    content: '*';
    color: #e4393c;
    margin-right: 4px;
}

#address-form input,
#address-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

#address-form input:focus,
#address-form select:focus {
    border-color: #e4393c;
    outline: none;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-actions button {
    flex: 1;
    padding: 12px 0;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cancel-btn {
    background-color: #ccc;
    color: #fff;
}

.cancel-btn:hover {
    background-color: #bbb;
}

.save-btn {
    background-color: #c8102e; /* Theme red color */
    color: #fff;
}

.save-btn:hover {
    background-color: #a00d25;
}

@media (max-width: 768px) {
    #share-modal {
        z-index: 1201;
    }
    .goods-detail-container {
        margin-top: 0;
        padding: 0;
    }
    .address-form-content {
        width: 95%;
        margin: 10% auto;
    }
    
    #address-form .form-row {
        flex-direction: row;
        gap: 10px;
    }
    
    #address-form .half-width {
        width: auto;
        flex: 1;
    }
    
    .cancel-btn {
        background-color: #999; /* Darker grey to match image */
        color: #fff;
    }

    .address-form-content {
        width: 100%; /* Slightly wider on mobile */
        padding: 20px 15px;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }
    .form-actions button {
        border-radius: 8px;
    }
    .sku-option-list-item {
        background-color: #F6F6F6;
    }
}

/* Payment Method Styles */
.payment-method-section {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.payment-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

.payment-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    min-width: 120px;
    position: relative;
    transition: all 0.3s ease;
}

.payment-option.active {
    /* border-color: #e4393c;
    background-color: rgba(228, 57, 60, 0.05); */
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-info img {
    width: 24px;
    height: 24px;
}

.payment-info span {
    font-size: 14px;
    font-weight: 500;
}

.radio-check {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 50%;
    position: relative;
}

.payment-option.active .radio-check {
    background-color: #e4393c;
    border-color: #e4393c;
}

.payment-option.active .radio-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 4px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: translate(-50%, -65%) rotate(-45deg);
}

/* Submit Order Footer Styles */
.submit-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px !important;
}

.order-summary {
    font-size: 14px;
    color: #333;
}

.order-summary .total-price {
    color: #e4393c;
    font-size: 18px;
    font-weight: bold;
    margin-left: 5px;
}

.submit-order-btn {
    background-color: #e4393c;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.submit-order-btn:hover {
    background-color: #c8102e;
}

/* Recommendation Styles */

/* Common Styles */
.recommendation-item {
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.recommendation-item:hover {
    transform: translateY(-5px);
}

.recommendation-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.recommendation-img-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: clamp(8px, 2vw, 12px);
    overflow: hidden;
    margin-bottom: clamp(8px, 2vw, 12px);
    border: 1px solid #f0f0f0;
    position: relative;
}

.recommendation-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recommendation-item:hover .recommendation-img-wrapper img {
    transform: scale(1.08);
}

.recommendation-title {
    font-size: clamp(13px, 1.5vw, 15px);
    color: #333;
    margin: 0 0 clamp(6px, 1vw, 10px) 0;
    line-height: 1.4;
    height: 2.8em; /* 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recommendation-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}

.current-price {
    color: #e4393c;
    font-weight: bold;
    font-size: clamp(16px, 2vw, 20px);
}

.current-price-max {
    color: #e4393c;
    font-weight: bold;
    font-size: clamp(20px, 2vw, 30px);
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: clamp(14px, 1.5vw, 18px);
}

/* Mobile View: Grid */
.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 3vw, 20px);
    padding: clamp(15px, 4vw, 20px) 0;
}

.recommendation-grid .recommendation-item {
    width: 100%;
}

/* PC View: Carousel */
.recommendation-carousel {
    display: none; /* Hidden on mobile */
    position: relative;
    align-items: center;
    margin: 20px 0;
    padding: 0 50px;
}

.carousel-viewport {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-out;
    gap: 20px;
}

.recommendation-carousel .recommendation-item {
    flex: 0 0 calc(20% - 16px); /* Default 5 items */
    min-width: 180px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s;
    z-index: 2;
}

.carousel-btn:hover {
    background-color: #d0d0d0;
}

.carousel-btn.prev {
    left: 0;
    padding-right: 2px;
}

.carousel-btn.next {
    right: 0;
    padding-left: 2px;
}

.carousel-btn.next:hover {
    background-color: #C42924;
    color: white;
}

/* Responsive Toggles & Adjustments */
@media (min-width: 768px) {
    .recommendation-grid {
        display: none;
    }
    
    .recommendation-carousel {
        display: flex;
    }
}

@media (max-width: 1200px) {
    .recommendation-carousel .recommendation-item {
        flex: 0 0 calc(25% - 15px); /* 4 items */
    }
}

@media (max-width: 992px) {
    .recommendation-carousel .recommendation-item {
        flex: 0 0 calc(33.333% - 14px); /* 3 items */
    }
}
