/* ==========================================================================
   GLOBAL RESET & TYPOGRAPHY
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Playfair Display', 'Didot', 'Georgia', serif;
}

body {
    background-color: #fcfbf9;
    color: #2c2c2c;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.logo {
    font-size: 24px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 700;
    text-decoration: none;
    color: #111;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #b8926a;
}

.cart-toggle {
    background: none;
    border: none;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    color: #555;
    cursor: pointer;
    font-family: inherit;
}

.cart-toggle:hover {
    color: #b8926a;
}

/* ==========================================================================
   HERO & GENERAL LAYOUTS
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.hero h1 {
    font-size: 48px;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 30px;
    max-width: 600px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #111;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: #b8926a;
}

.container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    width: 100%;
}

.page-title {
    text-align: center;
    font-size: 32px;
    letter-spacing: 2px;
    margin-bottom: 40px;
    text-transform: uppercase;
}

/* ==========================================================================
   PRODUCT GRID
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    text-align: center;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.product-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.product-title {
    font-size: 18px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.product-price {
    color: #b8926a;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 16px;
}

/* ==========================================================================
   SLIDE-OUT CART PANEL
   ========================================================================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 2000;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f9f9f9;
}

.cart-item-details h4 {
    font-size: 14px;
    letter-spacing: 1px;
}

.cart-item-details p {
    color: #b8926a;
    font-size: 13px;
}

.remove-btn {
    background: none;
    border: none;
    color: #cc0000;
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
}

.cart-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* ==========================================================================
   SPIN THE WHEEL MODAL CSS
   ========================================================================== */
.wheel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    transition: opacity 0.4s ease;
}

.wheel-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.wheel-container {
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.wheel-box {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 8px solid #111;
    margin: 30px auto;
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.1, 1, 0.1, 1);
    background: conic-gradient(#b8926a 0deg 90deg, #111 90deg 180deg,
            #b8926a 180deg 270deg, #111 270deg 360deg);
}

.wheel-pointer {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid #cc0000;
    position: absolute;
    left: 50%;
    top: 95px;
    transform: translateX(-50%);
    z-index: 3050;
}

.promo-banner {
    background: #f4efe9;
    border: 1px dashed #b8926a;
    padding: 10px;
    margin: 15px 0;
    font-size: 14px;
    display: none;
}

/* ==========================================================================
   CHECKOUT LAYOUT
   ========================================================================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
}

@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-section {
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: #111;
    color: #777;
    text-align: center;
    padding: 40px 20px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 80px;
}

/* ==========================================================================
   PRODUCT DETAIL VIEWPORT & GALLERY ENGINE
   ========================================================================== */
:root {
    --p-accent: #b8926a;
    --p-dark: #111111;
    --p-muted: #666666;
    --p-border: #eeeeee;
    --p-bg-fallback: #f4efe9;
}

.image-error-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--p-bg-fallback);
    border: 1px dashed var(--p-accent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    color: #777;
}

.image-error-placeholder span {
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: bold;
    color: var(--p-accent);
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* Layout Main Content Base Wrapper */
.p-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    margin-top: 30px;
    margin-bottom: 80px;
    align-items: start;
    width: 100%;
}

/* The Interactive Gallery Deck Wrapper Box */
.p-gallery-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
    min-width: 0;
    /* CRITICAL: Prevents horizontal overflow in flexbox */
}

/* Left Sidebar Rail Sizing Rules */
.p-thumb-rail {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 84px;
    flex-shrink: 0;
}

.p-thumb-item {
    width: 84px;
    height: 84px;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    position: relative;
    background-color: #fafafa;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.p-thumb-item:hover {
    border-color: var(--p-dark);
}

.p-thumb-item.active {
    border-color: var(--p-accent);
}

.p-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.p-video-badge-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--p-dark);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Main Display Stage Container Framework */
.p-main-viewport {
    flex: 1;
    width: 100%;
    min-width: 0;
    /* CRITICAL: Limits flex children sizing parameters */
    position: relative;
    aspect-ratio: 1 / 1;
    /* Locked Square Ratio */
    background-color: #ffffff;
    overflow: hidden;
    border: 1px solid #f9f9f9;
}

.p-zoom-target-frame {
    width: 100%;
    height: 100%;
    cursor: zoom-in;
    overflow: hidden;
    position: relative;
}

#mainActiveImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

#mainActiveVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right Detail Meta Content Layout Section */
.p-sticky-panel {
    position: sticky;
    top: 40px;
    padding-left: 10px;
    width: 100%;
}

.p-breadcrumb {
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.p-breadcrumb a {
    color: var(--p-muted);
    text-decoration: none;
}

.p-breadcrumb span {
    color: #999;
    margin: 0 6px;
}

.p-title-heading {
    font-size: 34px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.p-sku-label {
    font-size: 11px;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.p-price-tag {
    font-size: 22px;
    font-weight: 500;
    color: var(--p-dark);
    margin-bottom: 24px;
}

.p-action-wrapper {
    margin-bottom: 32px;
}

.p-submit-btn {
    width: 100%;
    background-color: var(--p-dark);
    color: #ffffff;
    border: 1px solid var(--p-dark);
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.p-submit-btn:hover {
    background-color: transparent;
    color: var(--p-dark);
}

.p-description-box {
    font-size: 14.5px;
    line-height: 1.65;
    color: #333333;
    margin-bottom: 40px;
}

.p-accordion-item {
    border-top: 1px solid var(--p-border);
}

.p-accordion-item:last-child {
    border-bottom: 1px solid var(--p-border);
}

.p-accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--p-dark);
}

.p-accordion-trigger .icon {
    font-size: 18px;
    font-weight: 300;
    transition: transform 0.2s ease;
}

.p-accordion-item.active .p-accordion-trigger .icon {
    transform: rotate(45deg);
}

.p-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}

.p-accordion-content-inner {
    padding-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--p-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS & RE-ALIGNMENTS
   ========================================================================== */
@media (max-width: 868px) {
    .p-detail-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .p-sticky-panel {
        position: relative;
        top: 0;
        padding-left: 0;
    }

    .p-title-heading {
        font-size: 28px;
    }
}

/* ==========================================================================
   MOBILE MEDIA QUERY INJECTS (Screens <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        margin: 30px auto;
        padding: 0 15px;
        width: 100%;
    }

    nav {
        flex-direction: row;
        /* Maintain clean horizontal distribution */
        justify-content: space-between;
        padding: 20px;
        position: relative;
    }

    /* Target the Hamburger Structure Elements */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1050;
    }

    .hamburger-bar {
        width: 100%;
        height: 2px;
        background-color: #111;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Animate Hamburger Bars into an 'X' close pattern when active */
    .menu-toggle.open .hamburger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.open .hamburger-bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        display: none;
        /* Hide by default on mobile viewports */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        border-bottom: 1px solid #eaeaea;
        padding: 20px 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        z-index: 1040;
    }

    /* Display layout when toggle class flag is active */
    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0 !important;
        text-align: center;
        width: 100%;
    }

    .nav-links li margin-left {
        margin-left: 0;
    }

    .hero {
        height: 50vh;
        padding: 15px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .checkout-section {
        padding: 20px;
    }

    /* Fixed Cart Layout Boundaries Control */
    .cart-sidebar {
        width: 100%;
        max-width: 400px;
    }

    .cart-items-container {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 20px;
    }

    .cart-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 20px;
        border-top: 1px solid #eee;
        z-index: 10;
    }

    /* Complete Mobile Media Overrides - Fixing Layout Breaks */
    .p-gallery-wrapper {
        flex-direction: column-reverse !important;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .p-main-viewport {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 1 / 1;
        /* Retains crisp 1:1 format frame */
        box-sizing: border-box;
    }

    .p-thumb-rail {
        display: flex !important;
        flex-direction: row !important;
        /* Transforms into horizontal axis */
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        /* Activates pure touch swipe interaction */
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 8px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        scrollbar-width: none;
    }

    .p-thumb-rail::-webkit-scrollbar {
        display: none;
        /* Hide standard system scrollbar tracks */
    }

    .p-thumb-item {
        flex: 0 0 64px !important;
        /* Lock fixed asset size markers */
        width: 64px !important;
        height: 64px !important;
        box-sizing: border-box;
    }

    .p-zoom-target-frame {
        cursor: default;
    }
}

/* Fallback override rule ensuring hidden hamburger on desktop setups */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

/* ==========================================================================
   MINIMALIST SOCIAL SHARING COMPONENT DOCK
   ========================================================================== */
.product-share-dock {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f1ece6; /* Soft border separation from checkout CTA */
}

.share-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: transparent;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Individual Brand Systems Inoculations */
.share-icon-btn.whatsapp-color {
    color: #128c7e;
    border: 1px solid #128c7e;
}
.share-icon-btn.whatsapp-color:hover {
    background-color: #128c7e;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(18, 140, 126, 0.2);
}

.share-icon-btn.instagram-color {
    color: #e1306c;
    border: 1px solid #e1306c;
}
.share-icon-btn.instagram-color:hover {
    background-color: #e1306c;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.2);
}

.share-icon-btn:hover {
    transform: translateY(-2px);
}

/* Elegant Notification Toast Feedback Element */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #111111;
    color: #ffffff;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s linear;
}

.share-toast.show-notification {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================================================
   SCARCITY OVERLAY DESIGN SPECIFICATIONS
   ========================================================================== */
.stock-scarcity-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 16px 0;
    padding: 6px 12px;
    background-color: #fdf5eb;
    border: 1px solid #f0e2d1;
    border-radius: 2px;
}
.stock-scarcity-badge .badge-text {
    font-size: 13px;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    color: #b8926a;
}
.stock-scarcity-badge .pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #b8926a;
    border-radius: 50%;
    position: relative;
}
.stock-scarcity-badge .pulse-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #b8926a;
    animation: microPulseEffect 2s infinite ease-in-out;
}
@keyframes microPulseEffect {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.5); opacity: 0; }
}
.stock-scarcity-badge.depleted {
    background-color: #f5f5f5;
    border-color: #e5e5e5;
}
.stock-scarcity-badge.depleted .pulse-dot, 
.stock-scarcity-badge.depleted .pulse-dot::after {
    background-color: #888888;
    animation: none;
}
.stock-scarcity-badge.depleted .badge-text {
    color: #666666;
}

/* Add to styles.css */
.add-to-cart-btn:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    border-color: #ccc;
    pointer-events: none; /* Prevents clicks entirely */
}