/* ============================================================================
   FILE: home.css
   DESCRIPTION: Main Landing Page Sections.
   Contains styles for Hero Slider, Our Promise, Products Grid, 
   and How to Order sections.
   ============================================================================ */

/* --- 1. HERO SLIDER SECTION --- */
/* The hero section sits directly below the fixed announcement bar (28px)
   and fixed header (~77px). The margin-top offsets both so content
   starts exactly below the sticky UI shell without overlap. */
.hero-slider-section { 
    position: relative; 
    overflow: hidden; 
    margin-top: calc(28px + 77px); 
    height: clamp(400px, 65vh, 700px); 
    padding: 0 !important;
    background-color: var(--text-main); 
}

.slider-container { 
    display: flex; 
    width: 100%; 
    height: 100%; 
}

.slide {
    min-width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    padding: 0 5%;
    position: relative;
    overflow: hidden; 
}

.slide-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    animation: kenBurns 15s infinite alternate linear;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.12); }
}

.slide-text-box {
    position: relative;
    z-index: 2;
    background: rgba(253, 251, 247, 0.88); 
    padding: clamp(25px, 4vw, 30px) clamp(20px, 5vw, 40px); 
    border-radius: var(--card-radius);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); 
    max-width: 750px; 
    width: 90%;
    opacity: 0;
    transform: translateY(20px);
    margin-bottom: 0;
}

body.page-loaded .slide-text-box {
    animation: fadeUpBox 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes fadeUpBox {
    to { opacity: 1; transform: translateY(0); }
}

.slide h1 { 
    font-size: clamp(1.1rem, 3.5vw, 2.2rem); 
    letter-spacing: 0; 
    color: var(--text-main); 
    margin-bottom: 6px; 
    line-height: 1.15; 
    white-space: nowrap; 
}

.slide p { 
    font-size: clamp(0.85rem, 1.8vw, 0.95rem); 
    color: var(--text-muted); 
    font-weight: 500; 
    line-height: 1.35; 
    margin-bottom: 18px; 
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; 
    padding: 8px 24px; 
    background: var(--text-main); 
    color: var(--text-light) !important; 
    text-decoration: none !important; 
    border: none !important; 
    border-radius: var(--btn-radius); 
    font-size: 0.75rem; 
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-btn::after {
    content: '→';
    font-size: 1rem;
    line-height: 1; 
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.hero-btn:hover {
    background: var(--primary-gold);
    color: var(--text-light) !important;
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(212, 160, 23, 0.2);
}

.hero-btn:hover::after { transform: translateX(4px); }

.slider-dots { 
    position: absolute; 
    bottom: 25px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 8px; 
    z-index: 10;
}

.dot { 
    width: 8px; 
    height: 8px; 
    background-color: rgba(255, 255, 255, 0.5); 
    border-radius: 20px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

.dot.active { 
    width: 25px; 
    border-radius: 10px;
    background-color: #ffffff; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* --- 2. OUR PROMISE SECTION --- */
#promise {
    position: relative;
    background-color: var(--bg-section);
    z-index: 1;
    overflow: hidden;
}

/* GLOBAL BACKGROUND PATTERN (For Promise & How to Order) */
.section-bg-pattern {
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background-image: radial-gradient(rgba(212, 160, 23, 0.12) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
    pointer-events: none;
}

.promise-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px; 
    max-width: 1100px; 
    margin: 0 auto; 
}

.promise-card {
    position: relative;
    background: var(--text-light);
    border: 1px solid rgba(212, 160, 23, 0.15);
    border-radius: var(--card-radius);
    padding: 35px 30px;
    overflow: hidden; 
    text-align: left;
    transition: box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
}

.promise-card:hover {
    transform: none; 
    border-color: rgba(212, 160, 23, 0.6);
    background-color: #FEFCF8; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(212, 160, 23, 0.15);
}

.promise-watermark-icon {
    position: absolute;
    bottom: -20px; 
    right: -20px;  
    opacity: 0.05; 
    color: var(--primary-gold);
    pointer-events: none;
    z-index: 1;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.promise-watermark-icon svg {
    width: 160px !important;
    height: 160px !important;
}

.promise-card:hover .promise-watermark-icon {
    transform: scale(1.15) rotate(-5deg); 
    opacity: 0.08;
}

.promise-content-box {
    position: relative;
    z-index: 2; 
}

.promise-headline {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.promise-subheadline {
    font-size: 0.75rem;
    color: var(--primary-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.promise-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- 3. PRODUCTS SECTION --- */
/* The product grid uses a fixed 4-column layout on desktop to ensure
   all product cards maintain consistent proportions and visual rhythm.
   On mobile, this switches to 2 columns via the responsive override below. */
#products { 
    background-color: #ffffff; 
    border-top: 1px solid rgba(212, 160, 23, 0.08); 
    border-bottom: 1px solid rgba(212, 160, 23, 0.08);
}

.product-grid {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    max-width: 1250px; 
    margin: 0 auto; 
}

.product-card {
    background: var(--text-light); 
    border-radius: var(--card-radius);
    border: 1px solid rgba(212, 160, 23, 0.15); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.product-card:hover { 
    transform: none; 
    border-color: rgba(212, 160, 23, 0.6);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(212, 160, 23, 0.15);
}

.product-tag {
    position: absolute;
    top: 0; left: 0;
    background-color: var(--primary-gold);
    color: var(--text-light);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    z-index: 2;
    border-bottom-right-radius: 8px; 
}

.product-tag.sold-out { background-color: var(--text-muted); }

.product-img-box { 
    width: 100%; 
    aspect-ratio: 1 / 1; 
    overflow: hidden; 
    background-color: #f9f9f9;
    position: relative;
}

.product-img { 
    width: 100%; height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease;
}

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

.product-content { 
    padding: 12px 14px; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1;
    align-items: flex-start;
    text-align: left; 
}

.product-title-row {
    display: flex;
    justify-content: space-between; 
    align-items: flex-start; 
    width: 100%;
    margin-bottom: 2px;
    gap: 10px; 
}

.product-title { 
    font-size: 0.85rem; 
    color: #222222; 
    font-weight: 600; 
    line-height: 1.3;
    text-align: left;
    flex: 1 1 auto; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price { 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: var(--text-main); 
    flex: 0 0 auto; 
    min-width: 60px; 
    text-align: right; 
}

.product-subtitle {
    font-size: 0.65rem; 
    color: var(--text-sub);
    font-weight: 400;
    margin-bottom: 12px;
    line-height: 1.4;
    display: block;
    width: 100%;
    text-align: left;
}

.variant-dropdown-wrapper {
    position: relative;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.06); 
    border-radius: var(--btn-radius);
    background: var(--bg-body); 
    width: 100%; 
}

.variant-select {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.75rem;
    color: #333333 !important;
    -webkit-text-fill-color: #333333;
    background-color: transparent;
    border: none;
    -webkit-appearance: none;
    appearance: none; 
    outline: none;
    cursor: pointer;
    font-weight: 400;
}

.variant-dropdown-wrapper::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.add-to-cart-btn {
    width: 100%;
    background-color: var(--text-main); 
    color: var(--text-light);
    border: none;
    padding: 10px 0; 
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--btn-radius); 
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    text-align: center;
}

/* --- PREMIUM ADD TO CART EFFECT (Home/Products Page) --- */
@media (hover: hover) {
    /* Prevent hover effect on disabled button */
    .add-to-cart-btn:not(:disabled):hover { 
        background-color: var(--primary-gold); 
        color: var(--text-light);
    }
}

.add-to-cart-btn.added-success {
    background-color: var(--wa-green) !important;
    color: var(--text-light) !important;
    pointer-events: none; /* Prevents double clicks */
}

.coming-soon-btn {
    width: 100%;
    padding: 10px 0;
    border: 1px dashed #aaaaaa; 
    background: transparent;
    color: #444444; 
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    border-radius: var(--btn-radius);
    margin-top: auto;
    cursor: default;
}

.sold-out-card .product-img { filter: grayscale(100%); opacity: 0.7; }
.add-to-cart-btn:disabled {
    background: #eeeeee;
    color: #888888;
    cursor: not-allowed;
}

/* --- 4. HOW TO ORDER --- */
#how-to-order { 
    background-color: var(--bg-section); 
    text-align: center; 
    position: relative;
    z-index: 1;
}

.steps-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px; 
    max-width: 1100px; 
    margin: 0 auto;
}

.step-box {
    background: var(--text-light); 
    border-radius: var(--card-radius);
    border: 1px solid rgba(212, 160, 23, 0.15);
    padding: 30px 25px; 
    position: relative; 
    text-align: left; 
    transition: box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
}

.step-box:hover { 
    transform: none; 
    border-color: rgba(212, 160, 23, 0.6);
    background-color: #FEFCF8;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(212, 160, 23, 0.15);
}

.step-bg-clip {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.step-watermark-icon {
    position: absolute;
    bottom: -20px; 
    right: -20px;  
    opacity: 0.05; 
    color: var(--primary-gold);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.step-watermark-icon svg {
    width: 160px !important; 
    height: 160px !important;
}

.step-box:hover .step-watermark-icon {
    transform: scale(1.1) rotate(-5deg); 
    opacity: 0.08;
}

.step-number {
    position: absolute;
    top: -14px; 
    left: 20px;
    background-color: var(--text-light); 
    border: 1px solid rgba(212, 160, 23, 0.15); 
    border-radius: var(--icon-radius);
    color: var(--primary-gold);
    font-size: 1.15rem; 
    font-weight: 700;
    padding: 2px 10px; 
    letter-spacing: 0.05em;
    z-index: 5;
    transition: all 0.4s ease; 
}

.step-box:hover .step-number {
    border-color: rgba(212, 160, 23, 0.4); 
    background-color: var(--text-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.step-content-box {
    position: relative;
    z-index: 2;
}

.step-headline { 
    font-size: 1.1rem; 
    color: var(--text-main); 
    margin-bottom: 8px; 
    font-weight: 700;
}

.step-text { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    line-height: 1.5; 
}

/* --- 5. MOBILE RESPONSIVENESS (Home Sections) --- */
@media (max-width: 768px) {
    /* Hero Slider Mobile */
    .hero-slider-section { 
        margin-top: calc(26px + 68px); 
        height: calc(85vh - 94px); 
    }
    .slide-text-box { padding: 20px 25px; width: 90%; }
    .slide h1 { font-size: 1.15rem; margin-bottom: 12px; white-space: normal; }
    .slide p { font-size: 1rem; }
    
    /* Our Promise Mobile */
    .promise-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 30px; }
    .promise-card { padding: 30px 20px; }
    .promise-watermark-icon { bottom: -15px; right: -15px; }
    .promise-watermark-icon svg { width: 130px !important; height: 130px !important; }
    
    /* Products Section Mobile */
    #products { padding: 40px 10px; } 
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .product-content { padding: 10px 8px; }
    .product-tag { font-size: 0.55rem; padding: 4px 8px; }
    .product-title-row { gap: 6px; }
    .product-title { font-size: 0.75rem; }
    .product-price { font-size: 0.8rem; min-width: 55px; }
    .product-subtitle { font-size: 0.6rem; margin-bottom: 8px; }
    .variant-select { font-size: 0.7rem; padding: 5px 8px; }
    .variant-dropdown-wrapper { margin-bottom: 10px; }
    .add-to-cart-btn { padding: 8px 0; font-size: 0.7rem; text-align: center; width: 100%;}
    .coming-soon-btn { padding: 8px 0; font-size: 0.65rem; text-align: center;}
    
    /* How to Order Mobile */
    #how-to-order { padding: 60px 5%; }
    .steps-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 30px; }
    .step-box { padding: 25px 20px; }
    .step-number { font-size: 1rem; top: -12px; left: 15px; padding: 2px 10px; }
    .step-headline { font-size: 1rem; margin-bottom: 6px; }
    .step-text { font-size: 0.85rem; }
    .step-watermark-icon { bottom: -15px; right: -15px; }
    .step-watermark-icon svg { width: 130px !important; height: 130px !important; }
}