/* ============================================
   Product Detail Page Styles
   ============================================ */

/* Gallery */
.product-gallery .gallery-main {
    border-radius: var(--border-radius-lg, 0.5rem);
    overflow: hidden;
}

.product-gallery .gallery-main .swiper-slide {
    background: #fff;
}

.product-gallery .gallery-main-img {
    --image-scale: 1;
    max-width: 100%;
    max-height: 100%;
}

.product-gallery .gallery-thumbnails .swiper-slide {
    opacity: 0.5;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.product-gallery .gallery-thumbnails .swiper-slide-thumb-active,
.product-gallery .gallery-thumbnails .swiper-slide:hover {
    opacity: 1;
    border-color: var(--color-primary, #ff6b35);
}

/* Share Group */
.share-group__item {
    transition: all 0.2s ease;
}

.share-group__item:hover {
    background-color: var(--color-neutral-50, #f5f5f5);
    transform: translateY(-2px);
}

/* Product Form */
.product-form-wrapper .product-title h1 {
    line-height: 1.3;
}

.product-form-wrapper .price {
    color: var(--color-price, #ee1926);
    font-weight: 700;
}

.product-form-wrapper .compare-price {
    color: var(--color-neutral-200, #999);
}

.product-form-wrapper .sale-badge {
    background: var(--color-sale-badge-bg, #ee1926);
    color: var(--color-sale-badge, #fff);
    border-radius: 4px;
}

/* Quantity Input */
.custom-number-input button {
    transition: background-color 0.15s ease;
}

.custom-number-input button:hover {
    background-color: var(--color-neutral-50, #f5f5f5);
}

.custom-number-input button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-number-input input[type="number"]::-webkit-inner-spin-button,
.custom-number-input input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-number-input input[type="number"] {
    -moz-appearance: textfield;
}

/* CTA Buttons */
.btn-buynow,
.btn-add-to-cart {
    padding: 1.2rem 2rem;
    border-radius: var(--border-radius-btn, 0.5rem);
    font-size: 1.4rem;
    transition: all 0.2s ease;
}

.btn-buynow:hover,
.btn-add-to-cart:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-buynow:active,
.btn-add-to-cart:active {
    transform: translateY(0);
}

/* Product Policies */
.product-polices {
    border-top: 1px solid var(--color-neutral-50, #f0f0f0);
    margin-top: 1.6rem;
    padding-top: 1.6rem;
}

.product-polices .item {
    font-size: 1.3rem;
    color: var(--color-neutral-300, #666);
}

/* Product Description */
.product-description .tab-nav {
    border-bottom: 2px solid var(--color-neutral-50, #f0f0f0);
}

.product-description .tab-btn {
    padding: 1.2rem 2.4rem;
    position: relative;
    color: var(--color-neutral-200, #999);
    transition: color 0.2s ease;
}

.product-description .tab-btn.active {
    color: var(--color-primary, #ff6b35);
}

.product-description .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary, #ff6b35);
}

.product-description .content {
    line-height: 1.8;
    font-size: 1.4rem;
}

.product-description .content p {
    margin-bottom: 1rem;
}

.product-description .content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.product-description .content table td,
.product-description .content table th {
    border: 1px solid var(--color-neutral-50, #f0f0f0);
    padding: 0.8rem 1.2rem;
    font-size: 1.3rem;
}

.product-description .content table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Expandable Content */
.expandable-content {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.expandable-content:not(.show-all) {
    max-height: 200px;
}

.expandable-content:not(.show-all)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.expandable-content.show-all {
    max-height: none !important;
}

.btn-showmore {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    border: 1px solid var(--color-neutral-50, #e0e0e0);
    border-radius: 2rem;
    font-size: 1.3rem;
    color: var(--color-primary, #ff6b35);
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
}

.btn-showmore:hover {
    background: var(--color-neutral-50, #f5f5f5);
}

/* Related Products Section */
.section-related-products {
    margin: var(--section-margin, 64px 0);
}

@media (max-width: 767px) {
    .section-related-products {
        margin: var(--section-margin-mb, 32px 0);
    }
}


/* Responsive */
@media (max-width: 1023px) {
    .product-detail {
        gap: 0 !important;
    }

    .product-form-wrapper {
        padding: 1.6rem;
    }
}