/* ============================================================
   JAMSHED AYAZ — Comprehensive Responsive CSS
   ============================================================ */

/* ── Large Desktop ── */
@media (min-width: 1400px) {
  .container { max-width: 1360px; }
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Tablet ── */
@media (max-width: 991px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .brand-story { grid-template-columns: 1fr; gap: 32px; }
  .testimonial-card { min-width: calc(50% - 12px); }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .slider-btn { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .product-detail-grid { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .shop-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .ceo-section { grid-template-columns: 1fr; gap: 32px; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .review-map-grid { grid-template-columns: 1fr !important; }
  .about-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .cart-layout { grid-template-columns: 1fr; }
  .hero { min-height: 85vh; }
  .hero-btns { flex-direction: column; align-items: center; gap: 12px; }
  .btn { padding: 12px 32px; }
  .admin-sidebar { transform: translateX(-100%); position: fixed; z-index: 200; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0 !important; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .inv-info { grid-template-columns: 1fr; }
  .inv-header { flex-direction: column; gap: 16px; }
  .tab-nav { flex-wrap: wrap; }
}

/* ── Mobile ── */
@media (max-width: 576px) {
  .container { padding: 0 16px; }
  .section-pad { padding: 40px 0; }
  .section-pad-sm { padding: 24px 0; }
  .section-title { margin-bottom: 24px; }
  .section-title h2 { font-size: 1.6rem; }

  /* Nav */
  .navbar { padding: 14px 0; }
  .nav-logo img { height: 40px; }

  /* Hero */
  .hero { min-height: 80vh; padding: 0 16px; }
  .hero-urdu { font-size: 2.8rem !important; }
  .hero-en { font-size: 2.5rem !important; }
  .hero-tagline { font-size: 0.7rem; }
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-btns .btn { width: 100%; max-width: 280px; text-align: center; }
  .hero-content { padding: 0 16px; }
  .hero-content .hero-urdu { font-size: 2.8rem; }
  .hero-content .hero-en { font-size: 2.5rem; }
  .hero-content .hero-tagline { font-size: 0.68rem; letter-spacing: 0.12em; }

  /* Products */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-img-wrap { height: 180px; min-height: 180px; max-height: 180px; }
  .product-info { padding: 12px; }
  .product-name { font-size: 0.82rem; }
  .price-current { font-size: 0.88rem; }

  /* Category */
  .category-grid { grid-template-columns: 1fr; gap: 2px; }
  .cat-label { font-size: 1.1rem; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-bottom p { font-size: 0.72rem; }
  .social-links { justify-content: center; }

  /* Stats */
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .about-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Brand Story */
  .brand-story { grid-template-columns: 1fr; gap: 24px; }
  .story-img img { height: 280px; }

  /* Values */
  .values-grid { grid-template-columns: 1fr; }

  /* Testimonials */
  .testimonial-card { min-width: 100%; margin-right: 0; }

  /* Cart */
  .cart-layout { grid-template-columns: 1fr; }
  .summary-box { position: static; }

  /* Checkout */
  .checkout-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }
  .review-map-grid { grid-template-columns: 1fr !important; }

  /* Page Hero */
  .page-hero { padding: 100px 0 40px; }
  .page-hero h1 { font-size: 2rem; }

  /* Buttons */
  .btn { padding: 12px 24px; font-size: 0.72rem; }

  /* Admin */
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .num { font-size: 1.4rem; }
  .admin-content { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-box { width: 95vw; max-height: 95vh; }
  .bar { flex-direction: column; }
  .search-box { width: 100%; }

  /* Invoice */
  .invoice-preview { padding: 20px !important; }
  .inv-header { flex-direction: column; gap: 12px; }
  .inv-info { grid-template-columns: 1fr; gap: 12px; }
  .inv-title { text-align: left; }
  .inv-totals { width: 100%; }

  /* Tab nav */
  .tab-nav { gap: 4px; }
  .tab-btn { padding: 8px 14px; font-size: 0.68rem; }

  /* WhatsApp float */
  .whatsapp-float { bottom: 16px; right: 16px; width: 46px; height: 46px; font-size: 1.2rem; }

  /* Filter bar mobile */
  .filter-bar-mobile { display: flex; flex-wrap: wrap; gap: 8px; }

  /* Attar how-to section */
  .attars-how-grid { grid-template-columns: 1fr !important; }
}

/* ── Small Mobile ── */
@media (max-width: 380px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-urdu { font-size: 2rem !important; }
  .product-img-wrap { height: 220px; min-height: 220px; max-height: 220px; }
}

/* ===== HERO SECTION - MOBILE ===== */
@media (max-width: 768px) {
  .hero {
    min-height: 60vh !important;
    position: relative !important;
    overflow: hidden !important;
  }
  .hero-bg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  .hero-bg img#hero-bg-img {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    opacity: 1 !important;
    display: block !important;
  }
  .hero-overlay {
    display: none;
  }
  /* Hide any leftover hero text/buttons */
  .hero-content,
  .hero-text,
  .hero-btns,
  .hero-chips {
    display: none !important;
  }

  .nav-logo img { max-height: 50px; }
  .nav-icons { display: flex; }
}

/* ===== FEATURED PRODUCTS SECTION - MOBILE ===== */
@media (max-width: 768px) {
  /* Section header: "Best Sellers" left, "View All" right */
  .section-header,
  .featured-header,
  .collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    margin-bottom: 12px;
  }
  .section-header h2,
  .featured-header h2,
  .collections-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
  }
  .section-header a,
  .view-all-link,
  .featured-header a {
    font-size: 0.8rem;
    color: #C9A84C;
    text-decoration: none;
    font-weight: 500;
  }

  /* Collections Section - remove big heading description */
  .cat-section .section-title p,
  .collections-section .section-subtitle,
  .collections-section > p,
  .cat-section > p,
  .cat-section .subtitle {
    display: none !important;
  }

  /* Section title smaller */
  .cat-section .section-title h2,
  .cat-section h2,
  .collections-section h2 {
    font-size: 1.1rem !important;
    text-align: left !important;
    padding-left: 12px;
    margin-bottom: 10px;
  }

  /* Decorative line under title - remove */
  .cat-section .gold-line,
  .collections-section .gold-line {
    display: none !important;
  }

  /* Category grid - 2 columns */
  .category-grid,
  .cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 12px;
  }

  /* Cat tile - image with text BELOW (not overlay) */
  .cat-tile {
    aspect-ratio: unset;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
  }

  .cat-tile img {
    width: 100%;
    aspect-ratio: 1/1;
    height: auto;
    object-fit: cover;
    display: block;
  }

  /* Hide overlay text on image */
  .cat-tile .cat-overlay,
  .cat-tile .cat-label,
  .cat-tile h3,
  .cat-tile .overlay {
    display: none !important;
  }

  /* Add category name BELOW image, left aligned */
  .cat-tile::after {
    content: attr(data-name);
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #111;
    padding: 6px 8px;
    background: #fff;
  }

  /* Product Grid */
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 12px !important;
  }

  .product-card {
    background: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: unset !important;
  }

  .product-img-wrap {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    overflow: hidden !important;
    position: relative !important;
    flex-shrink: 0 !important;
  }

  .product-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* NEW badge */
  .badge-new {
    position: absolute !important;
    top: 6px !important;
    left: 6px !important;
    background: #222 !important;
    color: #fff !important;
    font-size: 0.5rem !important;
    font-weight: 700 !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
    text-transform: uppercase !important;
    z-index: 2 !important;
  }

  /* Discount badge */
  .badge-sale {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    background: #c0392b !important;
    color: #fff !important;
    font-size: 0.5rem !important;
    font-weight: 700 !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
    z-index: 2 !important;
  }

  .product-info {
    padding: 5px 7px 3px !important;
    flex-shrink: 0 !important;
    background: #fff !important;
  }

  .product-cat {
    font-size: 0.52rem !important;
    color: #C9A84C !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    font-weight: 700 !important;
    margin: 0 0 1px !important;
  }

  .product-name {
    font-size: 0.7rem !important;
    color: #111 !important;
    font-weight: 600 !important;
    margin: 0 0 2px !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .product-price {
    font-size: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  .price-current {
    font-size: 0.72rem !important;
    color: #C9A84C !important;
    font-weight: 700 !important;
  }

  .price-old {
    font-size: 0.6rem !important;
    color: #999 !important;
    text-decoration: line-through !important;
    margin-left: 3px !important;
  }

  .quick-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px !important;
    padding: 4px 6px 6px !important;
    background: #fff !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    transform: none !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .quick-add-btn,
  .quick-order-btn {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 6px 0 !important;
    font-size: 0.5rem !important;
    font-weight: 800 !important;
    border-radius: 4px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    position: static !important;
    height: auto !important;
    box-sizing: border-box !important;
    letter-spacing: 0.2px !important;
    cursor: pointer !important;
  }

  .quick-add-btn {
    background: transparent !important;
    border: 1.5px solid #C9A84C !important;
    color: #C9A84C !important;
    box-shadow: none !important;
  }

  .quick-add-btn::before {
    content: none !important;
    display: none !important;
  }

  .quick-order-btn {
    background: #C9A84C !important;
    border: 1.5px solid #C9A84C !important;
    color: #fff !important;
    text-decoration: none !important;
  }

  /* Section header - View All right side */
  .featured-header,
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    margin-bottom: 10px;
  }
  .featured-header h2,
  .section-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
  }
  .view-all-link {
    font-size: 0.78rem;
    color: #C9A84C;
    text-decoration: none;
    font-weight: 500;
  }
}

/* ===== FOOTER - MOBILE (2-COLUMN) ===== */
@media (max-width: 768px) {

  footer {
    padding: 24px 0 0 !important;
  }

  .footer-grid {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr 1fr !important;
    gap: 10px 8px !important;
    padding: 0 10px !important;
    align-items: start !important;
  }

  /* Logo column */
  footer .footer-brand {
    grid-column: 1 / 2 !important;
  }

  footer .footer-brand img {
    height: 38px !important;
    width: auto !important;
    display: block !important;
    margin-bottom: 8px !important;
  }

  footer .footer-brand p {
    font-size: 0.58rem !important;
    line-height: 1.4 !important;
    color: #aaa !important;
    margin: 0 0 7px !important;
  }

  /* Social icons - force single row */
  footer .social-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
  }

  footer .social-links a {
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #333 !important;
    border-radius: 4px !important;
    font-size: 0.6rem !important;
    flex-shrink: 0 !important;
  }

  /* Quick Links column */
  footer .footer-col:nth-child(2) {
    grid-column: 2 / 3 !important;
  }

  /* Contact Us column */
  footer .footer-col:nth-child(3) {
    grid-column: 3 / 4 !important;
  }

  footer .footer-col h3 {
    font-size: 0.55rem !important;
    letter-spacing: 0.8px !important;
    color: #C9A84C !important;
    text-transform: uppercase !important;
    margin: 0 0 6px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  footer .footer-col ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  footer .footer-col ul li a {
    font-size: 0.58rem !important;
    color: #ccc !important;
    line-height: 1.7 !important;
    display: block !important;
    text-decoration: none !important;
  }

  /* Contact items - fix address wrapping */
  footer .footer-col .contact-item,
  footer .footer-col p {
    font-size: 0.56rem !important;
    color: #ccc !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 5px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  footer a[href*="wa.me"] {
    color: #C9A84C !important;
    font-size: 0.56rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
  }

  /* Footer bottom */
  .footer-bottom {
    text-align: center !important;
    font-size: 0.58rem !important;
    color: #555 !important;
    padding: 12px 14px !important;
    margin-top: 16px !important;
    border-top: 1px solid #222 !important;
    line-height: 1.5 !important;
  }

}
