/*
Theme Name: Navhar Foods
Theme URI: https://navharfoods.com
Author: Navhar Team
Description: Custom ecommerce theme for Navhar Foods
Version: 1.0
*/
:root {
      --green:       #1c8366;
      --green-dark:  #0f4f3d;
      --green-light: #e8f4f0;
      --amber:       #f7a942;
      --amber-light: #fff3e0;
      --cream:       #fef9f0;
      --dark:        #1a1a1a;
      --mid:         #555;
      --light:       #999;
      --border:      #e8e8e0;
      --white:       #ffffff;
      --shadow-sm:   0 2px 8px rgba(0,0,0,0.07);
      --shadow-md:   0 6px 24px rgba(0,0,0,0.10);
      --shadow-lg:   0 16px 48px rgba(0,0,0,0.14);
      --radius:      12px;
      --ease:        cubic-bezier(0.4, 0, 0.2, 1);
    }

    *, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
    html { scroll-behavior: smooth; }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--cream);
      color: var(--dark);
      -webkit-font-smoothing: antialiased;
    }

    a { text-decoration: none; color: inherit; }
    button { font-family: inherit; cursor: pointer; border: none; outline: none; }
    img { display: block; max-width: 100%; }

    /* ─── GRAIN TEXTURE ─── */
    body::before {
      content: '';
      position: fixed; inset: 0; pointer-events: none; z-index: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    }

    /* ─── HEADER ─── */
    .header {
      position: sticky; top: 0; z-index: 100;
      background: rgba(254,249,240,0.92);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
      transition: box-shadow 0.3s;
    }
    .header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

    .header-inner {
      max-width: 1400px; margin: 0 auto;
      padding: 0 32px;
      display: flex; align-items: center; justify-content: space-between;
      height: 68px; gap: 24px;
    }

    .logo {
      display: flex; align-items: center; gap: 10px;
      font-family: 'Playfair Display', serif;
      font-size: 22px; font-weight: 700;
      color: var(--green-dark);
    }
    .logo span { font-size: 28px; }

    .nav { display: flex; gap: 28px; }
    .nav a {
      font-size: 13px; font-weight: 500;
      color: var(--mid); letter-spacing: 0.5px; text-transform: uppercase;
      transition: color 0.25s;
    }
    .nav a:hover, .nav a.active { color: var(--green); }

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

    .cart-pill {
      display: flex; align-items: center; gap: 8px;
      background: var(--green); color: white;
      padding: 8px 18px; border-radius: 99px;
      font-size: 13px; font-weight: 600;
      transition: all 0.25s;
    }
    .cart-pill:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(28,131,102,.3); }
    .cart-count { background: var(--amber); color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }

    /* ─── HERO BANNER ─── */
    .shop-hero {
      position: relative;
      background: linear-gradient(135deg, var(--green-dark) 0%, #1c8366 50%, #2ab38a 100%);
      padding: 72px 32px 80px;
      overflow: hidden;
    }
    .shop-hero::after {
      content: '';
      position: absolute; inset: 0;
      background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }
    .shop-hero-deco {
      position: absolute;
      font-size: 120px; opacity: 0.08;
      pointer-events: none;
    }
    .shop-hero-deco-1 { top: -20px; right: 5%; transform: rotate(15deg); }
    .shop-hero-deco-2 { bottom: -30px; right: 20%; transform: rotate(-10deg); font-size: 90px; }
    .shop-hero-deco-3 { top: 10px; left: 2%; transform: rotate(-20deg); font-size: 80px; }

    .shop-hero-inner { max-width: 1400px; margin: 0 auto; position: relative; z-index: 1; }

    .hero-breadcrumb {
      display: flex; align-items: center; gap: 8px;
      font-size: 12px; color: rgba(255,255,255,0.6); letter-spacing: 0.5px;
      margin-bottom: 20px;
    }
    .hero-breadcrumb a { color: rgba(255,255,255,0.7); } 
    .hero-breadcrumb a:hover { color: var(--amber); }
    .hero-breadcrumb span { color: rgba(255,255,255,0.4); }

    .hero-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(36px, 5vw, 64px);
      color: white; line-height: 1.05;
      margin-bottom: 16px;
    }
    .hero-title em { color: var(--amber); font-style: italic; }

    .hero-subtitle {
      font-size: 15px; color: rgba(255,255,255,0.75);
      font-weight: 300; max-width: 480px; line-height: 1.7;
      margin-bottom: 28px;
    }

    .hero-pills { display: flex; flex-wrap: wrap; gap: 10px; }
    .hero-pill {
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.2);
      color: white; padding: 6px 16px; border-radius: 99px;
      font-size: 12px; font-weight: 500; letter-spacing: 0.5px;
    }

    /* ─── MAIN LAYOUT ─── */
    .shop-main {
      max-width: 1400px; margin: 0 auto;
      padding: 40px 32px 80px;
      display: grid;
      grid-template-columns: 260px 1fr;
      gap: 40px;
      position: relative; z-index: 1;
    }

    /* ─── SIDEBAR ─── */
    .sidebar { position: sticky; top: 88px; align-self: start; }

    .sidebar-card {
      background: white; border-radius: var(--radius);
      border: 1px solid var(--border);
      padding: 24px; margin-bottom: 16px;
      box-shadow: var(--shadow-sm);
    }

    .sidebar-title {
      font-size: 11px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 1.5px; color: var(--light);
      margin-bottom: 16px; padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }

    /* Search */
    .search-box {
      display: flex; align-items: center; gap: 10px;
      background: var(--cream); border: 1.5px solid var(--border);
      border-radius: 8px; padding: 10px 14px;
      transition: border-color 0.25s;
    }
    .search-box:focus-within { border-color: var(--green); }
    .search-box input {
      flex: 1; background: none; border: none; outline: none;
      font-family: inherit; font-size: 13px; color: var(--dark);
    }
    .search-box input::placeholder { color: var(--light); }

    /* Category list */
    .cat-list { list-style: none; }
    .cat-item {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 12px; border-radius: 8px;
      cursor: pointer; transition: all 0.2s;
      font-size: 14px; color: var(--mid);
    }
    .cat-item:hover { background: var(--green-light); color: var(--green); }
    .cat-item.active { background: var(--green); color: white; font-weight: 600; }
    .cat-item .cat-count {
      background: rgba(0,0,0,0.07); border-radius: 99px;
      padding: 2px 8px; font-size: 11px;
    }
    .cat-item.active .cat-count { background: rgba(255,255,255,0.2); }

    /* Tags */
    .tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
    .tag-btn {
      background: var(--cream); border: 1.5px solid var(--border);
      padding: 5px 12px; border-radius: 99px; font-size: 12px;
      color: var(--mid); transition: all 0.2s;
    }
    .tag-btn:hover { border-color: var(--green); color: var(--green); }
    .tag-btn.active { background: var(--amber); border-color: var(--amber); color: white; }

    /* Price range */
    .price-range { display: flex; gap: 12px; align-items: center; }
    .price-range input[type="range"] {
      flex: 1; accent-color: var(--green); height: 4px;
    }
    .price-display { font-size: 13px; color: var(--green); font-weight: 600; white-space: nowrap; }

    /* ─── PRODUCTS AREA ─── */
    .products-top {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
    }

    .results-count { font-size: 14px; color: var(--mid); }
    .results-count strong { color: var(--dark); font-weight: 600; }

    .sort-row { display: flex; align-items: center; gap: 12px; }

    .view-toggle { display: flex; gap: 4px; }
    .view-btn {
      width: 36px; height: 36px; border-radius: 8px;
      background: white; border: 1.5px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; transition: all 0.2s;
    }
    .view-btn.active, .view-btn:hover {
      background: var(--green); border-color: var(--green); color: white;
    }

    .sort-select {
      background: white; border: 1.5px solid var(--border);
      padding: 8px 14px; border-radius: 8px; font-family: inherit;
      font-size: 13px; color: var(--mid); cursor: pointer;
    }

    /* ─── PRODUCT GRID ─── */
    .products-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
      gap: 24px;
    }
    .products-grid.list-view {
      grid-template-columns: 1fr;
    }

    /* ─── PRODUCT CARD ─── */
    .product-card {
      background: white; border-radius: var(--radius);
      border: 1.5px solid var(--border);
      overflow: hidden; position: relative;
      transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
      display: flex; flex-direction: column;
    }
    .product-card:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow-lg);
      border-color: var(--green);
    }

    /* Badges */
    .badge-row {
      position: absolute; top: 12px; left: 12px;
      display: flex; gap: 6px; z-index: 3;
    }
    .badge {
      padding: 4px 10px; border-radius: 99px;
      font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    }
    .badge-bestseller { background: var(--amber); color: white; }
    .badge-new { background: #00c49f; color: white; }
    .badge-sale { background: #ff4757; color: white; }
    .badge-gf { background: var(--green-light); color: var(--green); }

    /* Wishlist button */
    .wishlist-btn {
      position: absolute; top: 12px; right: 12px; z-index: 3;
      width: 34px; height: 34px; border-radius: 50%;
      background: white; box-shadow: var(--shadow-sm);
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; transition: transform 0.25s;
    }
    .wishlist-btn:hover { transform: scale(1.15); }

    /* Image */
    .card-img {
      aspect-ratio: 1;
      background: linear-gradient(135deg, var(--cream), var(--green-light));
      overflow: hidden; position: relative;
      display: flex; align-items: center; justify-content: center;
      font-size: 80px;
    }
    .card-img img {
      width: 100%; height: 100%; object-fit: cover;
      transition: transform 0.6s var(--ease);
    }
    .card-img .emoji-placeholder { transition: transform 0.4s; }
    .product-card:hover .card-img img,
    .product-card:hover .emoji-placeholder { transform: scale(1.08); }

    /* Quick add overlay */
    .quick-add-overlay {
      position: absolute; inset: 0;
      background: rgba(15, 79, 61, 0.85);
      display: flex; align-items: center; justify-content: center; gap: 10px;
      opacity: 0; transition: opacity 0.3s;
    }
    .product-card:hover .quick-add-overlay { opacity: 1; }
    .overlay-btn {
      background: white; color: var(--green-dark);
      padding: 10px 18px; border-radius: 8px;
      font-size: 12px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.5px; transition: all 0.2s;
    }
    .overlay-btn:hover { background: var(--amber); color: white; }
    .overlay-btn.wa { background: #25d366; color: white; }
    .overlay-btn.wa:hover { background: #1ab954; }

    /* Card body */
    .card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }

    .card-cat {
      font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
      color: var(--light); margin-bottom: 6px;
    }

    .card-name {
      font-size: 15px; font-weight: 600; color: var(--dark);
      line-height: 1.4; margin-bottom: 10px;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }

    .card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
    .card-tag {
      background: var(--cream); color: var(--mid);
      font-size: 10px; padding: 3px 8px; border-radius: 4px;
    }

    .card-footer {
      margin-top: auto;
      display: flex; align-items: center; justify-content: space-between;
      padding-top: 14px; border-top: 1px solid var(--border);
    }

    .card-pricing { display: flex; align-items: baseline; gap: 6px; }
    .card-price { font-size: 22px; font-weight: 700; color: var(--green); }
    .card-mrp { font-size: 13px; color: var(--light); text-decoration: line-through; }

    .rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mid); }
    .rating .stars { color: #ffa500; }

    .add-btn {
      width: 100%;
      background: var(--green); color: white;
      padding: 12px; border-radius: 8px;
      font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
      margin-top: 12px; transition: all 0.25s;
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .add-btn:hover {
      background: var(--green-dark);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(28,131,102,.3);
    }
    .add-btn.added { background: var(--amber); }

    /* ─── LIST VIEW ─── */
    .products-grid.list-view .product-card { flex-direction: row; }
    .products-grid.list-view .card-img { aspect-ratio: unset; width: 200px; min-width: 200px; flex-shrink: 0; }
    .products-grid.list-view .badge-row { top: 12px; left: 12px; }
    .products-grid.list-view .wishlist-btn { display: none; }
    .products-grid.list-view .quick-add-overlay { display: none; }
    .products-grid.list-view .card-body { padding: 24px; }

    /* ─── EMPTY STATE ─── */
    .empty-state {
      grid-column: 1 / -1; text-align: center; padding: 80px 24px;
    }
    .empty-state .empty-icon { font-size: 72px; margin-bottom: 20px; }
    .empty-state h3 { font-family: 'Playfair Display', serif; font-size: 24px; margin-bottom: 8px; color: var(--dark); }
    .empty-state p { font-size: 14px; color: var(--light); }

    /* ─── TOAST ─── */
    .toast {
      position: fixed; bottom: 24px; right: 24px;
      background: var(--dark); color: white;
      padding: 12px 20px; border-radius: 10px; font-size: 13px;
      box-shadow: var(--shadow-md); z-index: 999;
      transform: translateY(100px); opacity: 0;
      transition: all 0.35s var(--ease);
      display: flex; align-items: center; gap: 10px;
    }
    .toast.show { transform: translateY(0); opacity: 1; }
    .toast-icon { font-size: 18px; }

    /* ─── CART DRAWER ─── */
    .drawer-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.45);
      z-index: 200; opacity: 0; pointer-events: none;
      transition: opacity 0.35s;
    }
    .drawer-overlay.open { opacity: 1; pointer-events: all; }

    .cart-drawer {
      position: fixed; top: 0; right: -420px; bottom: 0; width: 420px;
      background: white; z-index: 201;
      transition: right 0.4s var(--ease);
      display: flex; flex-direction: column;
      box-shadow: -8px 0 48px rgba(0,0,0,.15);
    }
    .cart-drawer.open { right: 0; }

    .drawer-header {
      padding: 24px; border-bottom: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .drawer-header h3 { font-family: 'Playfair Display', serif; font-size: 20px; }
    .drawer-close {
      width: 36px; height: 36px; border-radius: 50%;
      background: var(--cream); border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      font-size: 18px; transition: all 0.2s;
    }
    .drawer-close:hover { background: var(--green); color: white; }

    .drawer-items { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }

    .drawer-empty { text-align: center; padding: 60px 24px; color: var(--light); }
    .drawer-empty .de-icon { font-size: 48px; margin-bottom: 12px; }

    .cart-item {
      display: flex; gap: 16px; align-items: center;
      background: var(--cream); border-radius: 10px; padding: 14px;
    }
    .ci-img {
      width: 60px; height: 60px; border-radius: 8px;
      background: var(--green-light);
      display: flex; align-items: center; justify-content: center;
      font-size: 28px; flex-shrink: 0;
    }
    .ci-info { flex: 1; }
    .ci-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
    .ci-price { font-size: 15px; font-weight: 700; color: var(--green); }
    .ci-remove {
      background: none; font-size: 18px; color: var(--light);
      transition: color 0.2s;
    }
    .ci-remove:hover { color: #ff4757; }

    .drawer-footer { padding: 24px; border-top: 1px solid var(--border); }
    .drawer-total {
      display: flex; justify-content: space-between;
      font-size: 16px; font-weight: 700; margin-bottom: 16px;
    }
    .checkout-btn {
      width: 100%; background: var(--green); color: white;
      padding: 16px; border-radius: 10px; font-size: 15px; font-weight: 700;
      transition: all 0.25s;
    }
    .checkout-btn:hover { background: var(--green-dark); }
    .wa-checkout-btn {
      width: 100%; background: #25d366; color: white;
      padding: 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
      margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
    }

    /* ─── RESPONSIVE ─── */
    @media (max-width: 1024px) {
      .shop-main { grid-template-columns: 220px 1fr; gap: 28px; }
    }
    @media (max-width: 768px) {
      .shop-main { grid-template-columns: 1fr; }
      .sidebar { position: static; }
      .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
      .nav { display: none; }
      .shop-hero { padding: 48px 20px 56px; }
      .cart-drawer { width: 100%; }
    }
    @media (max-width: 480px) {
      .products-grid { grid-template-columns: 1fr; }
      .header-inner { padding: 0 16px; }
    }

    /* ─── ANIMATIONS ─── */
    @keyframes fadeUp {
      from { opacity:0; transform: translateY(24px); }
      to   { opacity:1; transform: translateY(0); }
    }
    .product-card {
      animation: fadeUp 0.5s ease both;
    }