:root {
    --forest: #14532d;
    --sand: #f5deb3;
    --sand-light: #faebd7;
    --charcoal: #18181b;
    --orange: #ea580c;
    --orange-hover: #c2410c;
}

body {
    background-color: var(--sand);
    color: var(--charcoal);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 80px; /* space for sticky bottom */
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

.topo-bg {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/foyj3h/site/media/69f13410ce5465.81454789.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    mix-blend-mode: multiply;
    z-index: -1;
    pointer-events: none;
}

.page-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Hero Header */
.hero-header {
    position: relative;
    padding: 60px 20px 0;
    text-align: center;
    margin-bottom: 30px;
}

.eyebrow {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 700;
    color: var(--forest);
    font-size: 0.85rem;
    display: inline-block;
    background: rgba(20, 83, 45, 0.1);
    padding: 6px 16px;
    border-radius: 999px;
}

.hero-header h1 {
    font-family: 'Zilla Slab', serif;
    font-size: 3.5rem;
    color: var(--charcoal);
    line-height: 1.1;
    max-width: 800px;
    margin: 24px auto 40px;
}

.hero-image {
    width: 100%;
    max-width: 900px;
    height: 350px;
    margin: 0 auto;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 6px solid white;
    background-color: var(--forest);
}

/* Main Layout Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    max-width: 1000px;
    margin: 20px auto 40px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Center Coupon Card (Main Column) */
.coupon-card {
    background: var(--charcoal);
    color: white;
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

/* Form Styles */
#entry-view {
    max-width: 400px;
    margin: 0 auto;
}

.form-title {
    font-family: 'Zilla Slab', serif;
    font-size: 2.2rem;
    color: var(--sand);
    margin-top: 0;
    margin-bottom: 12px;
}

#entry-view p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 30px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--sand);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--orange);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--orange);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--orange-hover);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.error-msg {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Result View Animations & Styles */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#result-view:not(.hidden) {
    animation: fadeIn 0.4s ease forwards;
}

.eligibility-bullets {
    display: flex;
    justify-content: center;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    font-weight: 600;
}

.eligibility-bullets li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-box {
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 16px;
    padding: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
}

#coupon-code {
    font-family: 'Space Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 2px;
}

.btn-copy {
    background: var(--forest);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-copy:hover {
    background: #1e7140;
}

.redeem-link {
    color: rgba(245, 222, 179, 0.7);
    font-size: 0.9rem;
    text-decoration: none;
    display: block;
    margin-bottom: 40px;
    transition: color 0.2s;
}

.redeem-link:hover {
    color: var(--sand);
    text-decoration: underline;
}

/* Product Grid */
.product-grid-section h3 {
    font-family: 'Zilla Slab', serif;
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: var(--sand);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.p-tile {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 20px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sand);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
}

.p-tile:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
}

.p-tile .emoji {
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

/* Side Strip (Reviews) */
.side-strip {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-strip h3 {
    font-family: 'Zilla Slab', serif;
    font-size: 1.5rem;
    color: var(--forest);
    margin-bottom: 8px;
    margin-top: 0;
}

.review-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    border: 1px solid rgba(0,0,0,0.05);
}

.review-card .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--sand);
    border: 2px solid var(--sand);
}

.stars {
    color: var(--orange);
    font-size: 14px;
    margin-bottom: 6px;
    letter-spacing: 2px;
}

.review-body p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--charcoal);
    line-height: 1.5;
    font-weight: 500;
}

/* Powered by slot */
#wbx-powered-by-slot {
    max-width: 1000px;
    margin: 20px auto 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Sticky Bottom CTA */
.sticky-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--forest);
    color: var(--sand);
    padding: 16px 20px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

.sticky-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-weight: 600;
    font-size: 1rem;
    flex-wrap: wrap;
}

.shop-now {
    background: var(--orange);
    color: white;
    padding: 10px 28px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    font-weight: 700;
}

.shop-now:hover {
    background: var(--orange-hover);
    transform: scale(1.05);
}

.dot {
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 860px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .side-strip {
        order: 2;
    }
    
    .coupon-section {
        order: 1;
    }
}

@media (max-width: 600px) {
    .hero-header h1 {
        font-size: 2.2rem;
    }
    
    .hero-image {
        height: 200px;
        border-width: 4px;
    }
    
    .coupon-card {
        padding: 30px 20px;
    }
    
    .eligibility-bullets {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .code-box {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    #coupon-code {
        font-size: 2.2rem;
    }
    
    .btn-copy {
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}