/* Strict Brand Image Dimensions */
.brand, a.brand { display: flex !important; align-items: center !important; text-decoration: none !important; flex-shrink: 0 !important; }
.brand img, a.brand img { height: 44px !important; max-height: 44px !important; width: auto !important; max-width: 180px !important; display: block !important; object-fit: contain !important; }
.footer-brand img { height: 38px !important; max-height: 38px !important; width: auto !important; max-width: 160px !important; margin-bottom: 10px !important; }
@media (max-width: 600px) {
  .brand img, a.brand img { height: 34px !important; max-height: 34px !important; max-width: 135px !important; }
}
*{box-sizing:border-box}html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #111827;
  background: #f8fafc;
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}a{color:inherit;text-decoration:none}.announcement{background:#155eef;color:white;text-align:center;padding:9px 14px;font-size:13px}.announcement a{text-decoration:underline;font-weight:600}
.site-header{background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px max(4vw,20px);position:relative;z-index:100}@media(min-width:961px){.site-header{position:sticky;top:0;}}
.brand{display:flex;align-items:center;text-decoration:none;flex-shrink:0;line-height:1}
.brand img{height:44px;width:auto;max-width:180px;display:block;object-fit:contain}
.footer-brand{margin-bottom:12px}
.footer-brand img{height:38px;width:auto;max-width:160px}
@media(max-width:600px){
  .brand img{height:34px;max-width:140px}
}.main-nav{display:flex;align-items:center;gap:18px;font-size:13px;font-weight:500;flex-shrink:0}
.main-nav a:hover,.header-actions a:hover{color:#155eef}
.search{display:flex;flex:1 1 340px;max-width:500px;min-width:200px;border:1px solid #d1d5db;border-radius:12px;overflow:hidden;background:#fff}
.search input{border:0;outline:0;padding:10px 14px;width:100%;font:inherit;font-size:13px;min-width:100px}
.search button{border:0;background:#155eef;color:#fff;padding:0 18px;font-size:20px;cursor:pointer;flex-shrink:0}
.header-actions{display:flex;align-items:center;gap:14px;font-size:13px;white-space:nowrap;flex-shrink:0}
.cart-link{background:#eff6ff;color:#155eef;padding:10px 13px;border-radius:10px;font-weight:600}
.container{width:100%;max-width:1220px;margin:0 auto;padding:20px 16px;min-height:55vh;box-sizing:border-box}
.hero{background:linear-gradient(120deg,#155eef,#1743a6);color:white;border-radius:24px;padding:55px 6%;display:grid;grid-template-columns:1.5fr 1fr;align-items:center;gap:25px;overflow:hidden}
.hero h1{font-size:clamp(26px,3.8vw,40px);line-height:1.2;margin:0 0 12px}
.hero p{font-size:16px;max-width:620px;color:#eaf0ff;line-height:1.8}
.hero-art{font-size:100px;text-align:center}
.btn{display:inline-block;border:0;border-radius:10px;padding:12px 19px;background:#155eef;color:white;font:600 14px Poppins;cursor:pointer}
.btn:hover{filter:brightness(.94)}
.btn.green{background:#16a34a}
.btn.orange{background:#ff7a00}
.btn.light{background:white;color:#155eef}
.btn.small{padding:8px 12px;font-size:12px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}
.section{margin:38px 0}
.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.section h2{font-size:24px;margin:0}
.muted{color:#6b7280;font-size:13px}
.category-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:13px}
.category{background:#fff;border:1px solid #e5e7eb;border-radius:15px;padding:20px;text-align:center;font-weight:600;font-size:13px}
.category .emoji{font-size:30px;display:block;margin-bottom:8px}
.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.product-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;overflow:hidden;transition:.2s}
.product-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px #11182712}
.product-card img{width:100%;aspect-ratio:1/1;object-fit:cover;background:#f3f4f6}
.product-info{padding:14px}
.product-info h3{font-size:14px;margin:0 0 7px;min-height:42px}
.price{font-size:18px;font-weight:700;color:#111827}
.seller-name{font-size:11px;color:#6b7280;margin:6px 0 12px}
.badge{display:inline-block;background:#dcfce7;color:#166534;border-radius:30px;padding:4px 9px;font-size:10px;font-weight:600}
.panel,.form-card,.table-wrap{background:white;border:1px solid #e5e7eb;border-radius:16px;padding:22px;margin:16px 0}
.form-card{max-width:600px;margin:20px auto}
.form-card h1{margin-top:0}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.field{margin:12px 0}
.field label{display:block;font-size:12px;font-weight:600;margin-bottom:6px}
.field input,.field textarea,.field select{width:100%;padding:12px;border:1px solid #d1d5db;border-radius:9px;font:inherit;font-size:13px}
.field textarea{min-height:100px}
.alert{padding:12px 15px;border-radius:10px;margin:14px 0;background:#dcfce7;color:#166534;font-size:13px}
.alert.warning{background:#fef3c7;color:#92400e}
.alert.error{background:#fee2e2;color:#991b1b}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.stat{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:18px}
.stat strong{font-size:25px;display:block}
.table{width:100%;border-collapse:collapse;font-size:13px}
.table th,.table td{text-align:left;padding:12px;border-bottom:1px solid #e5e7eb}
.table th{color:#6b7280;font-weight:600}
.table-wrap{overflow-x:auto}
.footer{background:#111827;color:#fff;margin-top:35px;padding:36px max(5vw,22px) 18px}
.footer-inner{max-width:1200px;margin:auto;display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:25px}
.footer-inner>div{display:flex;flex-direction:column;gap:9px;font-size:13px}
.footer p,.footer small{color:#cbd5e1}
.footer-brand{color:#fff}
.copyright{text-align:center;border-top:1px solid #374151;margin:25px auto 0;padding-top:15px;color:#9ca3af;font-size:11px;max-width:1200px}
.product-detail{display:grid;grid-template-columns:1fr 1fr;gap:35px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:24px}
.product-detail img{width:100%;border-radius:14px}
.quantity{width:75px;padding:10px;border:1px solid #d1d5db;border-radius:8px}
.empty{text-align:center;padding:45px;background:white;border:1px dashed #cbd5e1;border-radius:16px}
.tagline{color:#16a34a;font-weight:600;font-size:13px}
@media(max-width:960px){
  .site-header{position:relative !important;top:auto !important;flex-wrap:wrap !important;gap:10px !important;padding:10px 14px !important;}
  .brand{order:1 !important;}
  .header-actions{order:2 !important;margin-left:auto !important;}
  .search-wrapper{order:3 !important;width:100% !important;max-width:100% !important;min-width:100% !important;flex:1 1 100% !important;}
  .search{width:100% !important;max-width:100% !important;}
  .main-nav{order:4 !important;width:100% !important;overflow-x:auto !important;white-space:nowrap !important;padding:4px 0 2px !important;scrollbar-width:none !important;}
  .main-nav::-webkit-scrollbar{display:none !important;}
  .product-grid{grid-template-columns:repeat(3,1fr)}
  .category-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:600px){
  .container{padding:18px 14px}
  .site-header{position:relative !important;top:auto !important;padding:10px 12px !important;gap:8px !important;}
  .brand img, a.brand img{height:32px !important;max-height:32px !important;max-width:130px !important;}
  .header-actions{font-size:11px !important;gap:6px !important;}
  .header-actions a.btn.small{padding:5px 9px !important;font-size:11px !important;}
  .header-actions .cart-link{padding:6px 9px !important;font-size:11px !important;}
  .main-nav{gap:12px !important;font-size:12px !important;}
  .hero{grid-template-columns:1fr;padding:26px 16px}
  .hero-art{display:none}
  .product-grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .category-grid{grid-template-columns:repeat(2,1fr)}
  .product-detail{grid-template-columns:1fr;padding:14px}
  .form-grid,.stats{grid-template-columns:1fr}
  .footer-inner{grid-template-columns:1fr 1fr}
}
.plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.plan-card{margin:0}
.plan-price{font-size:25px;font-weight:800;color:#155eef;margin:12px 0}
@media(max-width:700px){.plan-grid{grid-template-columns:1fr}}
.seller-welcome{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:8px 0 20px}
.seller-welcome h1{margin:4px 0}
.seller-plan-strip{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:15px;padding:18px 20px;margin:16px 0}
.seller-plan-strip strong{font-size:16px}
.seller-plan-strip a,.section-head a{color:#155eef;font-weight:600;font-size:13px}
.seller-stats{grid-template-columns:repeat(3,minmax(0,1fr));margin:16px 0}
.seller-quick-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}
.seller-action{display:flex;flex-direction:column;gap:6px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:18px;transition:.2s}
.seller-action:hover{border-color:#155eef;transform:translateY(-2px)}
.seller-action strong{color:#111827}
.seller-action span,.seller-commission-note span{font-size:12px;color:#6b7280}
.status-pill{display:inline-block;padding:4px 9px;border-radius:20px;background:#f3f4f6;color:#374151;font-size:11px;font-weight:600}
.status-active{background:#dcfce7;color:#166534}
.status-pending{background:#fef3c7;color:#92400e}
.status-rejected{background:#fee2e2;color:#991b1b}
.seller-commission-note{display:flex;flex-direction:column;gap:5px;padding:16px 18px;border-left:4px solid #16a34a;background:#f0fdf4;border-radius:10px;margin:16px 0}
.seller-table-wrap{margin:0;padding:0;border:0}
@media(max-width:700px){
  .seller-welcome{align-items:flex-start;flex-direction:column}
  .seller-stats,.seller-quick-links{grid-template-columns:1fr}
  .seller-plan-strip{align-items:flex-start;flex-direction:column}
  .seller-table-wrap{padding:0}
}

.brand{display:flex;align-items:center;text-decoration:none;flex-shrink:0;line-height:1}
.brand img{height:46px;width:auto;max-width:200px;display:block;object-fit:contain}
.footer-brand{margin-bottom:10px}
.footer-brand img{height:40px;width:auto;max-width:180px}
@media(max-width:600px){
  .brand img{height:36px;max-width:160px}
}
@media (max-width: 700px) {
  .search select { display: none !important; }
}

/* Wishlist Floating Button & Cards */
.product-card {
  position: relative !important;
}
.wishlist-toggle-form {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  margin: 0;
}
.wishlist-btn {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s ease;
}
.wishlist-btn:hover {
  transform: scale(1.12);
  background: #ffffff;
}
.wishlist-btn.active {
  color: #ef4444;
  border-color: #fca5a5;
}
.wishlist-btn.inactive {
  color: #94a3b8;
}
.wishlist-btn.inactive:hover {
  color: #ef4444;
}

/* Seller Earnings & Ledger Styles */
.earnings-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.earnings-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.earnings-card span {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}
.earnings-card strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}
.earnings-card.highlight {
  background: #f0fdf4;
  border-color: #86efac;
}
.earnings-card.highlight strong {
  color: #166534;
}

@media (max-width: 850px) {
  .earnings-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 500px) {
  .earnings-cards {
    grid-template-columns: 1fr;
  }
}

/* Print Tax Invoice Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }
  .announcement, .site-header, .site-footer, .footer, footer, header, nav, .no-print, .alert {
    display: none !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .invoice-box {
    border: 1px solid #94a3b8 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 20px !important;
    margin: 0 !important;
  }
}
/* Mobile Bottom App Navigation Bar */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
  }
  body {
    padding-bottom: 65px !important;
  }
}


/* ==========================================================================
   SIPIFAI COMPREHENSIVE MOBILE VIEWPORT & RESPONSIVE OVERHAUL (2026)
   Optimized for Android & iOS mobile devices (320px - 768px)
   ========================================================================== */

/* 1. Global Viewport & Horizontal Scroll Lock */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Touch Targets & Tap Feedback */
@media (max-width: 768px) {
  .btn, button, input[type="submit"], select {
    min-height: 42px;
    touch-action: manipulation;
  }
  .btn.small {
    min-height: 32px;
  }
  /* Desktop text button collapse on mobile top header */
  .desktop-only-action {
    display: none !important;
  }
}

/* 2. Responsive Checkout & Cart Grid */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: flex-start;
}
@media (max-width: 850px) {
  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .shop-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .shop-sidebar {
    position: static !important;
    width: 100% !important;
    margin-bottom: 16px !important;
  }
}

/* 3. Automatic Single-Column Collapse for Desktop Split Grids */
@media (max-width: 768px) {
  [style*="grid-template-columns:1.4fr 1fr"],
  [style*="grid-template-columns: 1.4fr 1fr"],
  [style*="grid-template-columns:1.6fr 1fr"],
  [style*="grid-template-columns: 1.6fr 1fr"],
  [style*="grid-template-columns:1.8fr 1.2fr"],
  [style*="grid-template-columns: 1.8fr 1.2fr"],
  [style*="grid-template-columns:1.2fr 1fr"],
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns:1.3fr 1fr"],
  [style*="grid-template-columns: 1.3fr 1fr"],
  [style*="grid-template-columns:1.5fr 1fr"],
  [style*="grid-template-columns: 1.5fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1.6fr"],
  [style*="grid-template-columns: 1fr 1.6fr"],
  [style*="grid-template-columns:1.4fr 1fr;"],
  [style*="grid-template-columns:1.6fr 1fr;"],
  [style*="grid-template-columns:1.8fr 1.2fr;"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  [style*="grid-template-columns:repeat(4,"],
  [style*="grid-template-columns: repeat(4,"],
  [style*="grid-template-columns:repeat(4 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  [style*="grid-template-columns:repeat(3,"],
  [style*="grid-template-columns: repeat(3,"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Table overflow guard */
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .seller-welcome {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
}

/* 4. Product Catalog 2-Column Mobile Grid */
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .product-card {
    border-radius: 12px !important;
    display: flex;
    flex-direction: column;
  }
  .product-card img {
    height: 160px !important;
    object-fit: cover !important;
  }
  .product-info {
    padding: 10px !important;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  .product-info h3 {
    font-size: 13px !important;
    line-height: 1.3 !important;
    height: 34px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 4px !important;
  }
  .product-info .price {
    font-size: 15px !important;
  }
  .product-info .seller-name {
    font-size: 10px !important;
    margin-bottom: 6px !important;
  }
}

/* 5. Mobile Bottom App Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e2e8f0;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
  justify-content: space-around;
  align-items: center;
}
.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  gap: 3px;
  position: relative;
  min-width: 48px;
}
.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
  color: #155eef;
}
.mobile-nav-badge {
  position: absolute;
  top: -4px;
  right: 6px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  line-height: 1.2;
}
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
  }
  body {
    padding-bottom: 72px !important;
  }
}

/* 6. Order Tracking Stepper on Small Screens */
@media (max-width: 600px) {
  .order-track-stepper {
    gap: 4px !important;
    margin: 20px 0 !important;
  }
  .order-track-stepper > div > div:nth-child(2) {
    font-size: 11px !important;
  }
  .order-track-stepper > div > div:nth-child(3) {
    font-size: 9px !important;
  }
}
