/* ============================================================
   home.css  —  Khusus halaman Home (Views/home/index.php)
   Taruh di: public/assets/css/home.css
   Load di: Views/home/index.php via section('styles')
   ============================================================ */

/* ===== HERO ===== */
.hero-section {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}
/* Fallback gradient kalau banner kosong */
.hero-section-fallback {
    background: linear-gradient(135deg, #1B7A3E 0%, #2ECC71 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 64px 0 56px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,.30);
    backdrop-filter: blur(4px);
}
.hero-section h1 {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 46px;
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 6px;
    text-shadow: none;
}
.hero-section h1 span { color: var(--primary); }
.hero-section .hero-desc {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 460px;
    margin-bottom: 28px;
    line-height: 1.65;
}
.hero-features {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
}
.hero-feature .feat-icon {
    width: 34px; height: 34px;
    background: #fff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 15px;
    border: 1px solid var(--border);
    backdrop-filter: blur(4px);
}
.btn-hero-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 13px 28px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(27,122,62,.50);
}
.btn-hero-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(27,122,62,.55);
}
.btn-hero-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    backdrop-filter: blur(4px);
}
.btn-hero-outline:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.hero-trust-badge {
    position: absolute;
    top: 28px; right: 28px;
    z-index: 3;
    background: rgba(255,255,255,.95);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.hero-trust-badge .trust-num {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 28px;
    color: var(--primary);
    line-height: 1;
}
.hero-trust-badge .trust-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.3;
}

/* ===== CATEGORY STRIP ===== */
.category-strip {
    background: #fff;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}
.cat-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}
.cat-item {
    text-align: center;
    text-decoration: none;
    padding: 10px 4px;
    border-radius: var(--radius-sm);
    transition: all .2s;
    cursor: pointer;
}
.cat-item:hover { background: var(--primary-soft); transform: translateY(-3px); }
.cat-img-wrap {
    width: 64px; height: 64px;
    border-radius: 16px;
    margin: 0 auto 8px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light);
    border: 1.5px solid var(--border);
    transition: border-color .2s;
}
.cat-item:hover .cat-img-wrap { border-color: var(--primary); }
.cat-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.cat-img-wrap i { font-size: 24px; color: var(--primary); }
.cat-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ===== PROMO BANNER STRIP ===== */
.promo-strip {
    background: linear-gradient(90deg, var(--primary) 0%, #2ECC71 100%);
    padding: 14px 0;
}
.promo-strip-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.promo-strip-text {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.promo-strip-text i { font-size: 18px; }
.btn-promo-strip {
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-promo-strip:hover { background: var(--primary-light); color: var(--primary); }

/* ===== PRODUCTS SECTION ===== */
.products-section { padding: 40px 0; }

/* ===== FLASH SALE TIMER ===== */
.flash-sale-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.flash-badge {
    background: linear-gradient(135deg, #FF6B2C, #FF4444);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.timer-display {
    display: flex;
    align-items: center;
    gap: 5px;
}
.timer-block {
    background: var(--text-dark);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 7px;
    min-width: 38px;
    text-align: center;
}
.timer-sep { font-weight: 800; color: var(--text-dark); font-size: 16px; }

/* ===== KEUNGGULAN ===== */
.keunggulan-section {
    background: var(--primary-soft);
    padding: 44px 0;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.keunggulan-section.has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
}
.keunggulan-section.has-bg .container { position: relative; z-index: 1; }
.keunggulan-section.has-bg .section-title { color: #fff; }
.keunggulan-section.has-bg .keunggulan-card { background: rgba(255,255,255,0.95); }
.keunggulan-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
    border: 1.5px solid var(--border);
    height: 100%;
    transition: all .2s;
}
.keunggulan-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.keunggulan-icon {
    width: 52px; height: 52px;
    background: var(--primary-light);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    font-size: 22px;
    color: var(--primary);
}
.keunggulan-card h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.keunggulan-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}
@media (min-width: 992px) {
    .col-lg-keunggulan {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* ===== KATEGORI POPULER ===== */
.popcat-section { padding: 44px 0; }
.popcat-card {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    height: 180px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: all .25s;
}
.popcat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.popcat-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.popcat-card:hover img { transform: scale(1.08); }
.popcat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 60%);
}
.popcat-info {
    position: absolute;
    bottom: 14px; left: 14px;
}
.popcat-info h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    margin: 0;
}
.popcat-info span {
    font-size: 11px;
    color: rgba(255,255,255,.8);
}

/* ===== INFO WARUNG ===== */
.info-warung-section { padding: 44px 0; }
.info-card {
    border-radius: 18px;
    padding: 28px 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1.5px solid var(--border);
    background: #fff center/cover no-repeat;
    transition: all .2s;
    position: relative;
    overflow: hidden;
}
.info-card.has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.52);
    border-radius: 18px;
    z-index: 0;
}
.info-card.has-bg > * { position: relative; z-index: 1; }
.info-card.has-bg { border-color: transparent; }
.info-card.has-bg:hover { border-color: transparent; }
.info-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.info-card.has-bg .info-card-header h5,
.info-card.has-bg .info-row,
.info-card.has-bg .info-row strong { color: #fff; }
.info-card.has-bg .info-row i { color: rgba(255,255,255,.8); }
.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.info-card-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.info-card-icon.green { background: var(--primary-light); color: var(--primary); }
.info-card-icon.orange { background: #FFF0E8; color: var(--accent); }
.info-card.has-bg .info-card-icon.green,
.info-card.has-bg .info-card-icon.orange { background: rgba(255,255,255,.2); color: #fff; }
.info-card-header h5 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 17px;
    color: var(--text-dark);
    margin: 0;
}
.info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}
.info-row i { color: var(--primary); margin-top: 1px; flex-shrink: 0; font-size: 14px; }
.info-row strong { color: var(--text-dark); }
.btn-info {
    margin-top: auto;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    transition: all .2s;
}
.btn-info-green { background: var(--primary); color: #fff; }
.btn-info-green:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-info-orange { background: var(--accent); color: #fff; }
.btn-info-orange:hover { background: #e05a20; color: #fff; transform: translateY(-1px); }
.info-card.has-bg .btn-info-green,
.info-card.has-bg .btn-info-orange { background: rgba(255,255,255,.2); backdrop-filter: blur(4px); border: 1.5px solid rgba(255,255,255,.5); }
.info-card.has-bg .btn-info-green:hover,
.info-card.has-bg .btn-info-orange:hover { background: rgba(255,255,255,.35); }

/* ===== CARA BELANJA ===== */
.cara-belanja-section { padding: 52px 0; background: var(--primary-soft); }
.cara-belanja-step {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #fff;
    border-radius: var(--radius);
    padding: 24px 20px;
    border: 1.5px solid var(--border);
    height: 100%;
    transition: all .2s;
    position: relative;
}
.cara-belanja-step:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.step-number {
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 20px;
    flex-shrink: 0;
}
.step-body h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 5px;
}
.step-body p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}
.step-icon-right {
    margin-left: auto;
    font-size: 26px;
    color: var(--primary-light);
    align-self: center;
    flex-shrink: 0;
}
.cara-belanja-cta {
    text-align: center;
    margin-top: 36px;
}

/* ===== NEWSLETTER ===== */
.newsletter-section {
    padding: 52px 0;
    background: var(--primary);
    position: relative;
    overflow: hidden;
}
.newsletter-section::before {
    content: '';
    position: absolute;
    left: -60px; top: -60px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
}
.newsletter-section h4 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: #fff;
    margin-bottom: 8px;
}
.newsletter-section p { color: rgba(255,255,255,.8); font-size: 14px; margin: 0; }
.newsletter-input-group {
    display: flex;
    gap: 0;
    max-width: 420px;
    margin-left: auto;
}
.newsletter-input-group input {
    flex: 1;
    padding: 13px 18px;
    border: none;
    border-radius: 12px 0 0 12px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
}
.newsletter-input-group button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 12px 12px 0;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: background .2s;
}
.newsletter-input-group button:hover { background: #e05a20; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 28px; }
    .hero-content { padding: 44px 0 36px; }
    .hero-trust-badge { top: 16px; right: 16px; padding: 10px 14px; }
    .hero-trust-badge .trust-num { font-size: 22px; }
    .cat-grid { grid-template-columns: repeat(4, 1fr); }
    .newsletter-input-group { margin-left: 0; }
}

/* ===== SCROLL REVEAL ===== */
.sr-fade-up,
.sr-fade-left,
.sr-fade-right,
.sr-zoom {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.sr-fade-up    { transform: translateY(32px); }
.sr-fade-left  { transform: translateX(-32px); }
.sr-fade-right { transform: translateX(32px); }
.sr-zoom       { transform: scale(0.88); }

.sr-visible {
    opacity: 1 !important;
    transform: none !important;
}

/* Delay utilities */
.sr-delay-1 { transition-delay: 0.1s; }
.sr-delay-2 { transition-delay: 0.2s; }
.sr-delay-3 { transition-delay: 0.3s; }
.sr-delay-4 { transition-delay: 0.4s; }

/* Stagger — child items muncul berurutan */
.sr-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.sr-stagger.sr-visible > * {
    opacity: 1;
    transform: none;
}
.sr-stagger.sr-visible > *:nth-child(1) { transition-delay: 0.05s; }
.sr-stagger.sr-visible > *:nth-child(2) { transition-delay: 0.10s; }
.sr-stagger.sr-visible > *:nth-child(3) { transition-delay: 0.15s; }
.sr-stagger.sr-visible > *:nth-child(4) { transition-delay: 0.20s; }
.sr-stagger.sr-visible > *:nth-child(5) { transition-delay: 0.25s; }
.sr-stagger.sr-visible > *:nth-child(6) { transition-delay: 0.30s; }
.sr-stagger.sr-visible > *:nth-child(7) { transition-delay: 0.35s; }
.sr-stagger.sr-visible > *:nth-child(8) { transition-delay: 0.40s; }