/* ============================================
   NURASA CORNER — style.css
   ============================================
   Warna & font bisa diubah di bagian :root
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Warna utama — disesuaikan dengan logo */
    --primary: #5C3317;          /* coklat tua */
    --primary-light: #7A4A2A;    /* coklat medium */
    --primary-dark: #3E1F0D;     /* coklat gelap */
    --green: #4A7C3F;            /* hijau daun */
    --green-light: #6DAD5B;      /* hijau muda */
    --accent: #D4A373;           /* coklat keemasan */
    --accent-light: #E9C89B;     /* krem */
    --bg-warm: #FDF6EC;          /* latar krem hangat */
    --bg-light: #FEFCF8;         /* putih hangat */
    --text-dark: #2D1B0E;        /* teks gelap */
    --text-muted: #8C7A6B;       /* teks abu coklat */
    --white: #FFFFFF;
    --danger: #D64045;

    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(92,51,23,0.08);
    --shadow-md: 0 4px 20px rgba(92,51,23,0.12);
    --shadow-lg: 0 8px 32px rgba(92,51,23,0.16);

    /* Border radius */
    --radius: 16px;
    --radius-sm: 10px;

    /* Font */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Source Sans 3', sans-serif;
}

/* ============================================
   GLOBAL
   ============================================ */
* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar-custom {
    background: var(--primary);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.navbar-custom .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}

.navbar-custom .navbar-brand img {
    height: 46px;
    width: auto;
    border-radius: 8px;
}

.navbar-custom .brand-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--bg-warm) !important;
    letter-spacing: -0.3px;
    line-height: 1.1;
}

.navbar-custom .brand-text small {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.7;
    display: block;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-cart-nav {
    background: var(--accent);
    color: var(--primary-dark);
    border: none;
    border-radius: 50px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
}

.btn-cart-nav:hover {
    background: var(--accent-light);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
    background:
        linear-gradient(135deg,
            rgba(62,31,13,0.92) 0%,
            rgba(92,51,23,0.88) 50%,
            rgba(74,124,63,0.85) 100%
        ),
        url('assets/logo.jpeg') center/cover no-repeat;
    color: var(--white);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212,163,115,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(74,124,63,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-logo {
    max-width: 320px;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-section h1 .text-highlight {
    color: var(--accent-light);
}

.hero-section p.hero-desc {
    font-size: 1.15rem;
    opacity: 0.9;
    font-weight: 300;
    max-width: 500px;
}

.hero-badges .badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    color: var(--white);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 50px;
    margin-right: 8px;
    margin-top: 8px;
}

.hero-badges .badge i {
    color: var(--accent-light);
    margin-right: 4px;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.section-title .title-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--green));
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ============================================
   CATEGORY FILTER
   ============================================ */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 32px;
}

.btn-filter {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    border-radius: 50px;
    padding: 8px 22px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-filter:hover,
.btn-filter.active {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-card {
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-card .card-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Jika pakai emoji */
.product-card .card-img-wrap .product-emoji {
    font-size: 5rem;
    transition: transform 0.4s ease;
}

.product-card:hover .product-emoji {
    transform: scale(1.15) rotate(-3deg);
}

/* Jika pakai gambar */
.product-card .card-img-wrap .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-card .card-img-wrap .badge-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
}

.product-card .card-img-wrap .badge-promo {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
}

.product-card .card-body {
    padding: 20px;
}

.product-card .card-body h5 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.product-card .card-body .product-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-weight: 400;
}

.product-card .card-body .product-weight {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.product-card .card-body .product-weight i {
    color: var(--green);
}

.product-card .card-footer-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 20px;
}

.product-price {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price small {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.btn-add-cart {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-add-cart:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

.btn-add-cart.added {
    background: var(--green);
    color: var(--white);
}

/* ============================================
   CART OFFCANVAS
   ============================================ */
.offcanvas {
    max-width: 420px;
}

.offcanvas-header {
    background: var(--primary);
    color: var(--white);
    padding: 20px 24px;
}

.offcanvas-title {
    font-family: var(--font-display);
    font-weight: 700;
}

.offcanvas .btn-close {
    filter: invert(1);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0ebe4;
}

.cart-item-emoji {
    font-size: 2.4rem;
    width: 56px;
    height: 56px;
    background: var(--bg-warm);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h6 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.cart-item-info .cart-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-control button {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1.5px solid #e0d5c8;
    background: var(--white);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-qty-control button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cart-qty-control span {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.cart-remove {
    color: var(--danger);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: transform 0.2s;
}

.cart-remove:hover {
    transform: scale(1.2);
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.cart-empty i {
    font-size: 3.5rem;
    color: #ddd;
    margin-bottom: 16px;
}

.cart-summary {
    background: var(--bg-warm);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}

.cart-summary .total-label {
    font-weight: 500;
    color: var(--text-muted);
}

.cart-summary .total-price {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-checkout {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    margin-top: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-checkout:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   CHECKOUT MODAL
   ============================================ */
.modal-header {
    background: var(--primary);
    color: var(--white);
}

.modal-title {
    font-family: var(--font-display);
}

.modal .btn-close {
    filter: invert(1);
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(92,51,23,0.15);
}

.checkout-order-summary {
    background: var(--bg-warm);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
}

.checkout-item:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.btn-whatsapp {
    background: #25D366;
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #1da851;
    color: var(--white);
    transform: translateY(-1px);
}

.btn-whatsapp i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-section {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 20px;
    margin-top: 80px;
}

.footer-section h5 {
    color: var(--accent-light);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.footer-section .footer-logo {
    height: 50px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 32px;
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.toast-success {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-section { padding: 50px 0 40px; }
    .hero-section h1 { font-size: 2rem; }
    .hero-logo { max-width: 220px; }
    .product-card .card-img-wrap { height: 180px; }
    .product-card .card-img-wrap .product-emoji { font-size: 3.5rem; }
    .navbar-custom .brand-text { font-size: 1.15rem; }
}
