/* =====================================================
   SINGLE PRODUCT PAGE STYLES
   ===================================================== */

:root {
    --primary: #1a1a2e;
    --primary-dark: #16162a;
    --accent: #067811;
    --accent-hover: #1f713b;
    --accent-light: rgba(248, 156, 28, 0.1);
    --text-dark: #1a1a2e;
    --text-medium: #4a4a5e;
    --text-light: #8a8a9e;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --border: #dee2e6;
    --border-light: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

/* =====================================================
   PAGE HEADER / BREADCRUMB
   ===================================================== */

.page-header {
    background: var(--bg-light);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: var(--accent);
}

.breadcrumb-item.active {
    color: var(--text-dark);
}

/* =====================================================
   SINGLE PRODUCT SECTION
   ===================================================== */

.single-product-section {
    padding: 60px 0;
}

.product-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* =====================================================
   PRODUCT GALLERY
   ===================================================== */

.product-gallery-col {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-product-image {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    aspect-ratio: 1;
}

.main-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.2s ease-in-out;
}

.main-product-image:hover img {
    transform: scale(1.05);
}

.badge-hot {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.thumb {
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    aspect-ratio: 1;
}

.thumb:hover,
.thumb.active {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =====================================================
   PRODUCT INFO
   ===================================================== */

.product-info-col {
    display: flex;
    flex-direction: column;
}

.product-content {
    display: flex;
    flex-direction: column;
}

.product-cat {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.product-name {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.product-rating .stars {
    display: flex;
    gap: 3px;
}

.product-rating .stars i {
    color: #f39c12;
    font-size: 1rem;
}

.rating-val {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.review-count {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.review-count:hover {
    color: var(--accent);
}

/* Product Price Box */
.product-price-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
}

.current-price {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--accent);
}

.old-price {
    font-size: 1.5rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.save-badge {
    background: var(--accent);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Product Description */
.product-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 30px;
}

/* =====================================================
   PRODUCT VARIATIONS
   ===================================================== */

.product-variations {
    margin-bottom: 30px;
}

.var-group {
    margin-bottom: 25px;
}

.var-label {
    display: block;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.var-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.var-btn {
    padding: 12px 24px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
}

.var-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.var-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* =====================================================
   PRODUCT PURCHASE (Quantity & Actions)
   ===================================================== */

.product-purchase {
    margin-bottom: 30px;
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.qty-box label {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.qty-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border: none;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: var(--accent);
    color: white;
}

.qty-input {
    width: 80px;
    height: 50px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.qty-input:focus {
    outline: none;
}

.purchase-actions {
    display: flex;
    gap: 15px;
}

.btn-add-cart,
.btn-wishlist {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 30px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-cart {
    background: var(--accent);
    color: white;
}

.btn-add-cart:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-wishlist {
    background: white;
    color: var(--primary);
    border-color: var(--border);
}

.btn-wishlist:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =====================================================
   PRODUCT META DATA
   ===================================================== */

.product-meta-data {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 25px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta-label {
    font-weight: 600;
    color: var(--text-medium);
    min-width: 100px;
}

.meta-val {
    color: var(--text-dark);
    font-weight: 500;
}

.meta-val.in-stock {
    color: #27ae60;
}

/* =====================================================
   SHARE SECTION
   ===================================================== */

.share-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-section span {
    font-weight: 600;
    color: var(--text-medium);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: all 0.3s;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

/* =====================================================
   PRODUCT TABS
   ===================================================== */

.product-tabs-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.tabs-header {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 40px;
    overflow-x: auto;
}

.tab-link {
    padding: 18px 35px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-medium);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tab-link.active {
    color: var(--primary);
}

.tab-link.active::after {
    transform: scaleX(1);
}

.tabs-content {
    display: flex;
    flex-direction: column;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-pane h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 25px;
}

.tab-pane h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 25px 0 15px;
}

.tab-pane p {
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.tab-pane ul {
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.tab-pane li {
    padding: 10px 0;
    color: var(--text-medium);
    line-height: 1.7;
    position: relative;
    padding-left: 30px;
}

.tab-pane li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 800;
    font-size: 1.2rem;
}

.tab-pane li strong {
    color: var(--text-dark);
}

/* =====================================================
   SPECIFICATIONS TABLE
   ===================================================== */

.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.specs-table td {
    padding: 18px 25px;
    border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table tr:hover td {
    background: var(--bg-light);
}

.specs-table td:first-child {
    font-weight: 700;
    color: var(--text-medium);
    width: 35%;
    background: var(--bg-light);
}

/* =====================================================
   REVIEWS SECTION
   ===================================================== */

.reviews-summary-box {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.avg-rating {
    text-align: center;
    padding: 35px;
    background: var(--accent-light);
    border-radius: 16px;
    min-width: 180px;
}

.avg-rating .rating-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
}

.avg-rating .stars {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 10px;
}

.avg-rating .stars i {
    color: #f39c12;
    font-size: 1.3rem;
}

.total-reviews {
    font-size: 0.95rem;
    color: var(--text-light);
}

.rating-bars {
    flex: 1;
    min-width: 300px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.rating-bar-row > span:first-child {
    min-width: 60px;
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 600;
}

.bar-bg {
    flex: 1;
    height: 10px;
    background: var(--bg-gray);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.rating-bar-row > span:last-child {
    min-width: 45px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.review-card {
    padding: 30px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s;
}

.review-card:hover {
    box-shadow: var(--shadow-md);
}

.review-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.reviewer-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.review-date {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-left: 15px;
}

.review-stars {
    display: flex;
    gap: 3px;
}

.review-stars i {
    color: #f39c12;
    font-size: 1rem;
}

.review-text {
    line-height: 1.8;
    color: var(--text-medium);
}

/* =====================================================
   RELATED PRODUCTS SECTION
   ===================================================== */

.related-products-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* =====================================================
   RELATED PRODUCTS GRID
   ===================================================== */

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* Product Card Styles (from index.html) */
.product-card {
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Make the last row center properly */
.related-products-grid .product-card:last-child {
    grid-column: 2 / span 1;
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 10;
}

.product-badge.hot {
    background-color: #e74c3c;
    color: white;
}

.product-badge.sale {
    background-color: var(--accent);
    color: white;
}

.product-badge.new {
    background-color: #3498db;
    color: white;
}

/* Product Rating Badge */
.product-rating-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.product-rating-badge i {
    color: #f39c12;
}

.product-rating-badge .rating-count {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Product Image Wrapper */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

/* Product Body */
.product-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.4;
}

.product-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.product-title a:hover {
    color: var(--accent);
}

/* Product Price Wrapper */
.product-price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
}

.product-price-old {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 500;
}

.product-discount {
    background-color: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Product Action Buttons */
.product-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.product-view-btn,
.product-add-to-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.product-view-btn {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border-color: var(--border);
}

.product-view-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.product-add-to-cart {
    background-color: var(--accent);
    color: white;
    border: none;
}

.product-add-to-cart:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 1200px) {
    .product-wrapper {
        gap: 40px;
    }

    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 991px) {
    .product-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-gallery-col {
        position: static;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .reviews-summary-box {
        flex-direction: column;
        align-items: stretch;
    }

    .related-products-grid .product-card:last-child {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .single-product-section {
        padding: 40px 0;
    }

    .product-tabs-container {
        padding: 25px;
    }

    .tabs-header {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .tab-link {
        padding: 15px 20px;
        font-size: 0.9rem;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .related-products-grid .product-card:last-child {
        grid-column: auto;
    }

    .purchase-actions {
        flex-direction: column;
    }

    .qty-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .product-price-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .current-price {
        font-size: 2rem;
    }

    .product-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .tab-pane h3 {
        font-size: 1.3rem;
    }

    .specs-table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .share-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .related-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .related-products-grid .product-card:last-child {
        grid-column: auto;
    }
}
