/* ============================================================
   PRODUCT DETAIL PAGE STYLES
   ============================================================ */

.product-page {
    padding: var(--space-8) 0 var(--space-16);
    background: var(--color-gray-50);
}

/* ---------- PRODUCT LAYOUT ---------- */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-12);
}

/* ---------- PRODUCT GALLERY ---------- */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.main-image {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.main-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}
.main-image .badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
}
.thumbnail-list {
    display: flex;
    gap: var(--space-3);
}
.thumbnail-list .thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}
.thumbnail-list .thumb.active,
.thumbnail-list .thumb:hover {
    border-color: var(--brand-green);
    box-shadow: var(--shadow-md);
}
.thumbnail-list .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- PRODUCT DETAILS ---------- */
.product-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.product-details .product-category {
    font-size: var(--text-sm);
    color: var(--brand-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.product-name {
    font-size: var(--text-3xl);
    color: var(--color-gray-900);
    line-height: 1.2;
}
.product-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-gray-200);
}
.product-meta .product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.product-meta .sku {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}
.product-meta .stock {
    font-size: var(--text-sm);
    font-weight: 500;
}
.stock.in-stock { color: var(--color-success); }
.stock.out-stock { color: var(--color-danger); }

.product-price-detail {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) 0;
}
.product-price-detail .price-current {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--brand-green);
}
.product-price-detail .price-old {
    font-size: var(--text-xl);
    color: var(--color-gray-400);
    text-decoration: line-through;
}
.product-price-detail .discount {
    background: var(--color-danger);
    color: var(--color-white);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
}

.product-short-desc {
    font-size: var(--text-base);
    color: var(--color-gray-600);
    line-height: 1.7;
}

.product-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
}
.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-gray-700);
}
.feature-item i {
    color: var(--brand-green);
    font-size: var(--text-xs);
}

/* ---------- PRODUCT ACTIONS ---------- */
.product-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-gray-200);
    border-bottom: 1px solid var(--color-gray-200);
}
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.qty-selector button {
    width: 44px;
    height: 44px;
    background: var(--color-gray-50);
    font-size: var(--text-lg);
    color: var(--color-gray-700);
    transition: background var(--transition-fast);
}
.qty-selector button:hover {
    background: var(--color-gray-100);
}
.qty-input {
   
    height: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--color-gray-200);
    border-right: 1px solid var(--color-gray-200);
    font-weight: 600;
    color: var(--color-gray-900);
}

.product-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    padding: var(--space-4) 0;
}
.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--color-gray-600);
}
.trust-item i {
    font-size: 1.25rem;
    color: var(--brand-green);
}

.product-share {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-2);
}
.product-share span {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-gray-700);
}
.share-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: var(--text-sm);
    transition: transform var(--transition-fast);
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.copy { background: var(--color-gray-600); }

/* ---------- PRODUCT TABS ---------- */
.product-tabs {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-12);
    overflow: hidden;
}
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--color-gray-200);
    background: var(--color-gray-50);
}
.tab-btn {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-gray-600);
    border-bottom: 3px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.tab-btn:hover {
    color: var(--brand-green);
}
.tab-btn.active {
    color: var(--brand-green);
    border-bottom-color: var(--brand-green);
    background: var(--color-white);
}
.tabs-content {
    padding: var(--space-8);
}
.tab-panel {
    display: none;
    animation: fadeInUp 0.3s ease;
}
.tab-panel.active {
    display: block;
}
.tab-panel h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
}
.tab-panel p {
    color: var(--color-gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}
.tab-panel ul {
    list-style: disc;
    padding-left: var(--space-6);
    color: var(--color-gray-600);
    line-height: 1.8;
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}
.specs-table tr {
    border-bottom: 1px solid var(--color-gray-100);
}
.specs-table th,
.specs-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: var(--text-sm);
}
.specs-table th {
    width: 40%;
    color: var(--color-gray-700);
    font-weight: 600;
}
.specs-table td {
    color: var(--color-gray-600);
}

/* Reviews */
.reviews-summary {
    display: flex;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-gray-100);
}
.rating-big {
    font-size: var(--text-5xl);
    font-weight: 800;
    color: var(--color-gray-900);
    line-height: 1;
}
.rating-big span {
    font-size: var(--text-xl);
    color: var(--color-gray-500);
    font-weight: 400;
}
.rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.rating-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
}
.rating-bar .bar {
    flex: 1;
    height: 8px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.rating-bar .fill {
    height: 100%;
    background: var(--brand-green);
    border-radius: var(--radius-full);
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}
.review-item {
    padding: var(--space-5);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
}
.review-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.review-header img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.review-header h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
}
.review-header .review-date {
    font-size: var(--text-xs);
    color: var(--color-gray-500);
}
.review-item p {
    color: var(--color-gray-600);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin: 0;
}

/* Shipping Info */
.shipping-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}
.shipping-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
}
.shipping-item i {
    font-size: 1.5rem;
    color: var(--brand-green);
}
.shipping-item h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
}
.shipping-item p {
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    margin: 0;
}

/* ---------- RELATED PRODUCTS ---------- */
.related-products {
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-gray-200);
}

/* ---------- PRODUCTS GRID (for related products) ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

/* ---------- PRODUCT CARD ---------- */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: all var(--transition-base);
    border: 1px solid var(--color-gray-100);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* Badge position */
.product-card .badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 2;
}

/* Wishlist button */
.wishlist-btn {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-400);
    font-size: var(--text-sm);
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}
.wishlist-btn:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

/* Product image */
.product-card .product-image {
    height: 240px;
    overflow: hidden;
    position: relative;
    display: block;
}
.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Quick view overlay */
.quick-view {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    background: rgba(46, 139, 87, 0.9);
    color: var(--color-white);
    text-align: center;
    padding: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: bottom var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}
.product-card:hover .quick-view {
    bottom: 0;
}

/* Product info */
.product-card .product-info {
    padding: var(--space-4) var(--space-5) var(--space-5);
}

.product-card .product-category {
    font-size: var(--text-xs);
    color: var(--brand-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-1);
    display: block;
}

.product-card .product-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: var(--space-2);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .product-title a:hover {
    color: var(--brand-green);
}

/* Rating */
.product-card .product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}
.product-card .stars {
    color: #FFB300;
    font-size: var(--text-xs);
}
.product-card .rating-count {
    font-size: var(--text-xs);
    color: var(--color-gray-500);
}

/* Price */
.product-card .product-price {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.product-card .price-current {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--brand-green);
    font-family: var(--font-heading);
}
.product-card .price-old {
    font-size: var(--text-sm);
    color: var(--color-gray-400);
    text-decoration: line-through;
}

/* Add to cart button */
.btn-add-cart {
    width: 100%;
    padding: var(--space-3);
    background: var(--brand-green);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: all var(--transition-base);
}
.btn-add-cart:hover {
    background: var(--brand-green-hover);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    .main-image img {
        height: 400px;
    }
    .related-products .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-name {
        font-size: var(--text-2xl);
    }
    .product-actions {
        flex-wrap: wrap;
    }
    .product-actions .btn-lg {
        flex: 1;
    }
    .product-trust {
        grid-template-columns: repeat(2, 1fr);
    }
    .tabs-nav {
        overflow-x: auto;
    }
    .shipping-info {
        grid-template-columns: 1fr;
    }
    .reviews-summary {
        flex-direction: column;
        gap: var(--space-4);
    }
    .related-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .main-image img {
        height: 300px;
    }
    .thumbnail-list {
        gap: var(--space-2);
    }
    .thumbnail-list .thumb {
        width: 60px;
        height: 60px;
    }
    .product-features {
        grid-template-columns: 1fr;
    }
    .related-products .products-grid {
        grid-template-columns: 1fr;
    }
}