/* Consolidated Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Gotu&family=Merriweather:ital,wght@0,300;0,700;1,300&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Barlow', sans-serif;
}

:root {
    --body-color: #ffffff;
    --header-bg: #F7F4EF;
    --menu-color: #1C2430;
    --menu-bg-trans: #b6064170;
    --mobilemenu-color: #f7f4ef;
    --footer-bg: #1C2430;
    --footer-text: #a0a0a0;
    --footer-heading: #ffffff;
    --footer-link-hover: #ffffff;
    --footer-border: #2a2a2a;
}

/* Global Overflow Prevention */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    background-color: var(--body-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Product Page Container */
.product-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* 1. Left Column: Gallery */
.product-gallery {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

.main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 1:1 Square Sharp Thumbnails */
.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumbnails img {
    width: 75px;
    height: 75px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: 1px solid #ddd;
    cursor: pointer;
    border-radius: 4px;
    background-color: #fff;
    transition: 0.3s;
    flex-shrink: 0;
}

.thumbnails img.active, .thumbnails img:hover {
    border-color: #b8860b; /* Gold accent */
}

/* 2. Right Column: Info */
.product-info {
    flex: 1.2;
    width: 100%;
    box-sizing: border-box;
}

.limited-tag {
    color: #b8860b;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
}

.product-title {
    font-family: 'Merriweather', serif;
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 10px;
    color: #111;
}

.product-author {
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
}

/* Price Section */
.product-price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
}

.old-price {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background: #e63946; /* Brand Red */
    color: white;
    padding: 4px 10px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 4px;
}

.product-description {
    line-height: 1.6;
    color: #444;
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* 3. Purchase Actions */
.purchase-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.quantity-selector {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-selector button {
    background: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.2rem;
}

.quantity-selector button:hover {
    background: #f9f9f9;
}

.quantity-selector input {
    width: 50px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-weight: bold;
}

.add-to-cart-btn {
    flex-grow: 1;
    background: #b60640;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    padding: 12px 20px;
    cursor: pointer;
    transition: 0.3s;
}

.main-buy-btn {
    flex-grow: 1;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    padding: 12px 20px;
    cursor: pointer;
    transition: 0.3s;
}

.main-buy-btn:hover {
    background: #333;
}

/* 4. Tabs Section */
.product-tabs {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1rem;
    color: #888;
    cursor: pointer;
    padding: 10px 20px 10px 0;
    margin-right: 20px;
    position: relative;
}

.tab-btn.active {
    color: #000;
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80%;
    height: 2px;
    background: #b8860b;
}

.tab-content {
    margin-top: 20px;
}

.tab-content ul {
    list-style: none;
    padding: 0;
}

.tab-content li {
    margin-bottom: 10px;
    color: #555;
    font-size: 0.95rem;
}

/* Mobile & Tablet Responsive Rules */
@media (max-width: 992px) {
    .product-container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .product-layout {
        flex-direction: column;
        gap: 25px;
    }

    .product-gallery {
        max-width: 100%;
    }

    .product-title {
        font-size: 1.8rem;
    }

    .purchase-actions {
        flex-direction: column;
        gap: 12px;
    }

    .quantity-selector {
        width: 100%;
        justify-content: space-between;
    }

    .quantity-selector input {
        flex-grow: 1;
    }

    .thumbnails img {
        width: 65px;
        height: 65px;
    }
}