/**
 * Master Visual Styles v9.0.0
 * Affiliate Catalog Theme by Positype Co.
 * ---------------------------------------------------------
 * Storefront layout layer for the Hybrid Commerce OS. Tuned to pair
 * with the Affiliate Catalog companion plugin by Ghost Engine for
 * maximum beauty and high-end speed.
 */

/* 1. Universal Layout & Header */
.master-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
    backdrop-filter: blur(14px);
    border-bottom: 2px solid #e55a2b;
}

.header-flex { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 16px 0; 
    max-width: 1200px;
    margin: 0 auto;
    width: 95%;
}

.site-logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -.03em;
    text-decoration: none;
    color: #ffffff;
}

/* 2. THE NUCLEAR MENU FIX (Forcing Horizontal) */
.header-center { 
    flex: 1; 
    display: flex; 
    justify-content: center; 
    padding: 0 20px;
}


.header-center div > ul,
.header-center ul.master-nav-list,
.header-center .menu > ul {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 32px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

.header-center ul li {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.header-center ul li a {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.header-center ul li a:hover {
    color: #ffe5d9;
}

.header-right { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
}

/* 3. Hybrid Bento Grid & Cards */
.master-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.bento-card {
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.4s ease;
    border-radius: 0;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--surface, #ffffff);
    overflow: hidden;
    position: relative;
}

.bento-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12); 
    border-color: var(--accent, #3b82f6); 
}

.card-img-box img { 
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1); 
    width: 100%;
    height: auto;
    display: block;
}

.bento-card:hover .card-img-box img { 
    transform: scale(1.08); 
}

/* 4. Premium WooCommerce Adapter (Boutique UI) */
.woocommerce-adapter .product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin: 40px 0;
}

/* Checkout & Cart Refresh */
.woocommerce-cart .master-content,
.woocommerce-checkout .master-content {
    background: #f8fafc;
    padding: 60px 0;
}

@media (min-width: 992px) {
    .woocommerce-checkout form.checkout { 
        display: grid; 
        grid-template-columns: 1fr 450px; 
        gap: 40px; 
        align-items: start; 
    }
}

#customer_details, 
#order_review,
.cart-collaterals .cart_totals { 
    background: #ffffff; 
    padding: 35px; 
    border-radius: 24px; 
    border: 1px solid var(--border, #e2e8f0); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}

.woocommerce #place_order,
.woocommerce .checkout-button,
.woocommerce .single_add_to_cart_button { 
    background: var(--accent, #3b82f6) !important; 
    color: #fff !important;
    padding: 20px !important; 
    border-radius: 14px !important; 
    font-weight: 800 !important; 
    width: 100%; 
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: filter 0.3s ease;
}

.woocommerce #place_order:hover { filter: brightness(1.1); }

/* 5. Responsive Optimization */
@media (max-width: 1024px) {
    .header-center {
        width: 100%;
        order: 3;
        padding: 15px 0 0;
        border-top: 1px solid var(--border, #e2e8f0);
        overflow-x: auto;
    }
    .header-center ul { gap: 20px !important; justify-content: flex-start !important; }
}

@media (max-width: 768px) {
    .master-bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-item-1, .bento-item-6 { grid-column: span 2; }
    .woocommerce-adapter .product { grid-template-columns: 1fr; }

    /* Sticky Mobile CTA */
    .single-product-actions-fixed { 
        position: fixed; 
        bottom: 0; left: 0; right: 0; 
        background: rgba(255,255,255,0.96); 
        backdrop-filter: blur(15px); 
        padding: 16px 20px; 
        z-index: 1001; 
        box-shadow: 0 -10px 40px rgba(0,0,0,0.1); 
        display: flex; gap: 12px; 
    }
    
    body.single-product, 
    body.single-aff_catalog_item { padding-bottom: 100px; }
}