/* ============================================================
   BagIT Dropshop — CSS PATCH
   Add this to the END of your existing style.css
   ============================================================ */

/* PRODUCT CARD — EQUAL HEIGHT FIX */
.products-grid {
  align-items: stretch;
}
.product-card {
  display: flex;
  flex-direction: column;
}
.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-name {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 40px;
}
.product-pricing {
  margin-top: auto;
}
.add-to-cart {
  margin-top: auto;
}

/* PRODUCT IMAGE — CONSISTENT SIZE */
.product-card .product-img {
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
  background: var(--surface2);
}
.product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .product-img img {
  transform: scale(1.05);
}

/* HEADER — MOBILE FIX */
@media (max-width: 768px) {
  header {
    padding: 10px 16px;
    gap: 10px;
  }
  .logo {
    font-size: 24px;
  }
  .header-actions {
    gap: 8px;
  }
  .btn-icon {
    padding: 8px 12px;
    font-size: 12px;
    gap: 4px;
  }
  .cart-btn {
    padding: 8px 14px;
  }
  .search-bar {
    order: 3;
    margin-top: 4px;
  }
  .search-bar input {
    padding: 10px 16px;
    font-size: 13px;
  }
  .search-bar button {
    padding: 0 14px;
  }
  
  /* NAV MOBILE */
  nav {
    padding: 0 12px;
    -webkit-overflow-scrolling: touch;
  }
  nav a {
    padding: 12px 10px;
    font-size: 12px;
  }
  
  /* HERO MOBILE */
  .hero-left {
    padding: 36px 20px;
  }
  .hero h1 {
    font-size: 48px;
  }
  .hero p {
    font-size: 14px;
    margin-bottom: 24px;
  }
  .hero-ctas {
    flex-direction: column;
    gap: 10px;
  }
  .btn-primary, .btn-secondary {
    padding: 14px 24px;
    font-size: 14px;
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  
  /* STATS MOBILE */
  .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .stat {
    border-right: none;
    padding: 8px 0;
  }
  .stat-num {
    font-size: 22px;
  }
  .stat-label {
    font-size: 10px;
  }
  
  /* SECTIONS MOBILE */
  .section-title {
    font-size: 28px;
  }
  .section-header {
    margin-bottom: 20px;
  }
  
  /* CATEGORIES MOBILE */
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .cat-card {
    padding: 16px 10px;
  }
  .cat-icon {
    font-size: 28px;
    margin-bottom: 8px;
  }
  .cat-name {
    font-size: 11px;
  }
  
  /* FLASH SALE MOBILE */
  .flash-header {
    flex-direction: column;
    gap: 14px;
    text-align: center;
    padding: 16px 20px;
  }
  .flash-title h2 {
    font-size: 24px;
  }
  .countdown-block {
    padding: 8px 10px;
    min-width: 44px;
  }
  .countdown-num {
    font-size: 18px;
  }
  
  /* PRODUCT GRID MOBILE */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-info {
    padding: 12px;
  }
  .product-name {
    font-size: 13px;
    min-height: 34px;
  }
  .price-current {
    font-size: 15px;
  }
  .price-original {
    font-size: 11px;
  }
  .price-save {
    font-size: 10px;
    padding: 2px 6px;
  }
  .product-stars {
    font-size: 11px;
    margin-bottom: 10px;
  }
  .add-to-cart {
    padding: 10px;
    font-size: 12px;
  }
  
  /* FEATURED BANNERS MOBILE */
  .featured-banner {
    gap: 12px;
  }
  .banner-card {
    padding: 24px 20px;
  }
  .banner-card h3 {
    font-size: 24px;
  }
  .banner-emoji {
    font-size: 50px;
    right: 16px;
  }
  
  /* NEWSLETTER MOBILE */
  .newsletter {
    padding: 40px 20px;
  }
  .newsletter h2 {
    font-size: 32px;
  }
  .newsletter-form {
    flex-direction: column;
    border-radius: 12px;
  }
  .newsletter-form input {
    border-radius: 8px;
    padding: 14px 20px;
  }
  .newsletter-form button {
    border-radius: 8px;
    padding: 14px 20px;
  }
  
  /* FOOTER MOBILE */
  footer {
    padding: 30px 20px 20px;
  }
  .footer-grid {
    gap: 24px;
    margin-bottom: 24px;
  }
  .footer-brand .logo {
    font-size: 24px;
  }
  
  /* PAGE TITLE MOBILE */
  .page-title {
    font-size: 32px;
  }
  
  /* PRODUCT DETAIL MOBILE */
  .product-detail {
    gap: 24px;
  }
  .product-detail-info h1 {
    font-size: 28px;
  }
  .product-detail-info .price-current {
    font-size: 24px;
  }
  .product-actions {
    flex-direction: column;
  }
  .product-actions .btn-primary {
    width: 100%;
    justify-content: center;
  }
  
  /* CHECKOUT MOBILE */
  .checkout-section {
    padding: 20px;
  }
  .checkout-section h3 {
    font-size: 20px;
  }
  
  /* CART MOBILE */
  .cart-item {
    grid-template-columns: 50px 1fr auto;
    gap: 10px;
    padding: 14px;
  }
  .cart-item-img {
    width: 50px;
    height: 50px;
  }
  .cart-summary {
    padding: 20px;
    position: static;
  }
  
  /* AUTH MOBILE */
  .auth-container {
    margin: 30px auto;
  }
  .auth-box {
    padding: 24px 20px;
  }
  .auth-box h1 {
    font-size: 28px;
  }
  
  /* ADMIN MOBILE */
  .orders-table {
    font-size: 12px;
  }
  .orders-table th, .orders-table td {
    padding: 10px 8px;
  }
}

/* EXTRA SMALL SCREENS */
@media (max-width: 380px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .header-actions .btn-icon:not(.cart-btn) {
    display: none;
  }
}

/* TICKER MOBILE */
@media (max-width: 768px) {
  .ticker {
    font-size: 11px;
    padding: 6px 0;
  }
}

/* FLASH MESSAGE MOBILE */
.flash-msg {
  font-size: 13px;
  padding: 10px 16px !important;
}
/* ============================================================
   SHOP SIDEBAR — MOBILE COLLAPSIBLE
   Add this to the END of mobile-patch.css
   ============================================================ */

/* Mobile filter toggle button */
.filter-toggle {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
  margin-bottom: 16px;
  transition: all 0.2s;
}
.filter-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 1024px) {
  .filter-toggle {
    display: block;
  }
  .shop-sidebar {
    display: none;
    margin-bottom: 16px;
  }
  .shop-sidebar.open {
    display: block;
  }
}
/* ============================================================
   ACCOUNT PAGE — MOBILE FIX
   Append this to the END of mobile-patch.css
   ============================================================ */

@media (max-width: 1024px) {
  /* Account page — stack profile and orders vertically */
  .page-container > div[style*="grid-template-columns: 1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
}

@media (max-width: 768px) {
  /* Account nav buttons — stack */
  .page-container > div[style*="display:flex"][style*="margin-bottom:32px"] {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  /* Contact page — stack columns */
  .page-container > div[style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  /* Order detail — stack */
  .page-container > div[style*="grid-template-columns:1fr 380px"],
  .page-container > div[style*="grid-template-columns:1fr 350px"],
  .page-container > div[style*="grid-template-columns: 1fr 380px"],
  .page-container > div[style*="grid-template-columns: 1fr 350px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  /* Orders table — horizontal scroll */
  .orders-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  /* Product detail page — stack gallery and info */
  .product-detail {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  
  /* Product gallery — max height on mobile */
  .product-gallery {
    max-height: 400px;
  }
  
  /* Checkout layout — stack */
  .checkout-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* Cart layout — stack */
  .cart-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* Cart summary — not sticky on mobile */
  .cart-summary {
    position: static !important;
  }
  
  /* Shop sidebar — not sticky on mobile */
  .shop-sidebar {
    position: static !important;
  }
  
  /* Auth page — tighter padding */
  .auth-container {
    margin: 20px auto;
    padding: 0 12px;
  }
  .auth-box {
    padding: 24px 18px;
  }
  .auth-box h1 {
    font-size: 26px;
  }
  
  /* Prose pages — full width */
  .prose {
    max-width: 100%;
  }
  
  /* Admin stat cards — 2 columns on mobile */
  .page-container > div[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  /* Admin CJ browser — single column cards */
  div[style*="grid-template-columns:repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* Extra small */
@media (max-width: 380px) {
  /* Admin stat cards — single column */
  .page-container > div[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Even tighter auth */
  .auth-box {
    padding: 20px 14px;
  }
}
