/* style.css — Clean modern stylesheet (rewritten from Whisper base) */



@font-face {
  font-family: "Blaziest Switzer";
  src: url("./fonts/Switzer-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Blaziest Switzer";
  src: url("./fonts/Switzer-VariableItalic.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens (kept from Whisper color/spacing system, simplified) ---------- */
:root{
  --color-bg: #ffffff;
  --color-text: #030d17;
  --color-primary: rgb(12,52,90);            /* main brand blue */
  --color-primary-contrast: #eff2f7;
  --color-muted: rgba(3,13,23,0.6);
  --color-border: #eef2f7;
  --radius-sm: 8px;
  --radius-lg: 12px;
  --gap: 1rem;
  --max-width: 1200px;
  --container-padding: 1rem;
  --site-padding: 1.25rem;
  --shadow-sm: 0 6px 20px rgba(0,0,0,0.08);
}

/* ---------- Base reset ---------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Blaziest Switzer", Arial, sans-serif;
  color:var(--color-text);
  background:var(--color-bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.4;
  -webkit-text-size-adjust:100%;
}

/* ---------- helpers ---------- */
.container{
  width:100%;
  max-width:var(--max-width);
  margin:0 auto;
  padding:0 var(--container-padding);
}
.small{font-size:.9rem}
.muted{color:var(--color-muted)}

.grid{display:grid;gap:var(--gap)}
.grid-3{grid-template-columns:repeat(1,1fr)}
@media(min-width:720px){.grid-3{grid-template-columns:repeat(3,1fr)}}

/* ---------- header ---------- */
.site-header{
  background:linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.9));
  border-bottom:1px solid var(--color-border);
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(6px);
}
.header-inner{
  display:flex;
  align-items:center;
  gap:1rem;
  padding:0.9rem var(--site-padding);
}
.brand{
  font-family: "Blaziest Switzer", Arial, sans-serif;
  font-size:1.6rem;
  text-decoration:none;
  color:var(--color-text);
  letter-spacing:0.02em;
}
.site-nav{margin-left:1rem; flex:1}
.nav-list{
  display:flex;
  gap:1rem;
  list-style:none;
  margin:0;
  padding:0;
  align-items:center;
}
.nav-list a{ text-decoration:none; color:var(--color-text); font-weight:500; font-size:.98rem; padding:.45rem .5rem; border-radius:6px}
.nav-list a:hover{background:rgba(12,52,90,0.04)}

.header-actions{display:flex; align-items:center; gap:.6rem}
.icon-btn{
  border:1px solid var(--color-border);
  background:transparent;
  padding:.45rem .6rem;
  border-radius:8px;
  font-size:1rem;
  cursor:pointer;
}

/* Profile avatar + dropdown */
.profile-menu{
  position: relative;
}

/* Make the profile button look like a small circular avatar */
.profile-menu .icon-btn{
  border-radius: 999px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Dropdown panel (hidden by default) */
.profile-dropdown{
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0.75rem 0.5rem;
  display: none;
  z-index: 60;
}

/* When JS adds the "open" class, show it */
.profile-dropdown.open{
  display: block;
}

.profile-dropdown-header{
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.profile-dropdown-header strong{
  display: block;
}

.profile-dropdown-header span{
  display: block;
  color: var(--color-muted);
  font-size: 0.78rem;
}

/* Items inside the dropdown */
.dropdown-item{
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.35rem 0;
  font-size: 0.86rem;
  cursor: pointer;
}

.dropdown-item:hover{
  color: var(--color-primary);
}


.cta{ text-decoration:none; padding:.55rem .9rem; border-radius:10px; display:inline-block; font-weight:600}
.cta.primary{ background:var(--color-primary); color:var(--color-primary-contrast)}
.cta.secondary{ border:1px solid var(--color-border); color:var(--color-text); background:transparent}
.cta.ghost{ background:transparent; border:1px solid rgba(3,13,23,0.06); color:var(--color-text)}

/* ---------- hero ---------- */
.hero{
  padding:2.25rem 0;
  background:linear-gradient(180deg, rgba(12,52,90,0.03), transparent);
}
.hero-inner{
  display:grid;
  gap:1.5rem;
  align-items:center;
  grid-template-columns:1fr;
}
@media(min-width:920px){
  .hero-inner{grid-template-columns: 1fr 520px; align-items:center}
}
.hero-copy .display{
  font-family: "Blaziest Switzer", Arial, sans-serif;
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  line-height:1;
  margin:0 0 .6rem 0;
  letter-spacing:var(--font-h1--spacing,0.02em);
  color:var(--color-text);
}
.lead{font-size:1.05rem; color:var(--color-muted); margin:0 0 1rem}
.hero-ctas{display:flex; gap:.75rem}
.hero-media img{
  width:100%;
  height:auto;
  border-radius:12px;
  box-shadow:var(--shadow-sm);
  object-fit:cover;
}

/* ---------- features ---------- */
.features{padding:2rem 0}
.feature{background:transparent; text-align:center; padding:1rem}
.feature-img{width:100%; height:140px; object-fit:cover; border-radius:10px; margin-bottom:.6rem}

/* ---------- products ---------- */
.products{padding:2rem 0}
.section-title{font-family: "Blaziest Switzer", Arial, sans-serif; font-size:1.6rem; margin:0 0 1rem}
.product-grid{
  grid-template-columns:repeat(1,1fr);
  display:grid;
  gap:1rem;
}
@media(min-width:640px){
  .product-grid{grid-template-columns:repeat(3,1fr)}
}
.product-card{
  border:1px solid var(--color-border);
  border-radius:10px;
  overflow:hidden;
  background:var(--color-bg);
  transition:transform .18s ease, box-shadow .18s ease;
}
.product-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow-sm) }
.product-media img{width:100%; height:220px; object-fit:cover}
.product-info{padding:0.85rem}
.product-title{font-weight:600; margin:0 0 .4rem}
.price{color:var(--color-primary); font-weight:700; margin:0 0 .6rem}
.btn{display:inline-block; background:var(--color-primary); color:var(--color-primary-contrast); padding:.5rem .75rem; border-radius:8px; text-decoration:none; font-weight:600}

/* ---------- cta banner ---------- */
.cta-banner{padding:1.2rem 0; background:var(--color-primary); color:var(--color-primary-contrast)}
.cta-inner{display:flex; align-items:center; justify-content:space-between; gap:1rem}
.cta-banner h3{margin:0}
.cta-banner p{margin:0; opacity:.95}

/* ---------- footer ---------- */
.site-footer{
  margin-top:2rem;
  border-top:1px solid var(--color-border);
  background:linear-gradient(180deg, rgba(250,250,250,1), rgba(245,245,247,1));
}
.footer-grid{
  display:grid;
  gap:1.25rem;
  grid-template-columns: 1fr;
  padding:2rem var(--container-padding);
}
@media(min-width:880px){
  .footer-grid{grid-template-columns: 1.3fr 1fr 1fr 1fr}
}
.footer-brand .footer-logo{font-family: "Blaziest Switzer", Arial, sans-serif; font-size:1.2rem; text-decoration:none; color:var(--color-text)}
.footer-nav h4{margin:0 0 .5rem}
.footer-nav ul{list-style:none; margin:0; padding:0}
.footer-nav a{text-decoration:none; color:var(--color-text); display:block; padding:.25rem 0}
.newsletter-form{display:flex; gap:.5rem; align-items:center}
.newsletter-form input[type="email"]{padding:.6rem .7rem; border-radius:8px; border:1px solid var(--color-border); flex:1}
.btn.small{padding:.45rem .65rem}

/* small text and bottom */
.footer-bottom{padding:1rem 0; border-top:1px solid rgba(0,0,0,0.04)}
.footer-bottom .container{display:flex; justify-content:center}

/* ---------- accessibility focus states ---------- */
a:focus, button:focus, input:focus{outline:3px solid rgba(12,52,90,0.14); outline-offset:3px}

/* ---------- utilities ---------- */
.center{text-align:center}
.hide{display:none}

/* ---------- small screens tweaks ---------- */
@media(max-width:640px){
  .nav-list{display:none}
  .header-actions .cta.secondary{display:none}
  .hero-media{order: -1} /* show image above copy on small */
}

/* ===========================================
   SHOP PAGE + CART SIDEBAR
=========================================== */

/* Product Grid */
.product-grid {
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
}

/* Product Card */
.product-card {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  transition: 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.product-card h3 {
  font-size: 1.1rem;
  margin: 10px 0 5px;
}

.product-card .price {
  font-weight: 600;
  margin-bottom: 12px;
}

/* Add to Cart Button */
.product-card .addCartBtn {
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.2s ease;
  width: 100%;
}

.product-card .addCartBtn:hover {
  background: #333;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 20;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 14px rgba(0,0,0,0.1);
  padding: 20px;
  transition: 0.35s ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

/* Cart Header */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cart-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
}

.cart-item {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-info h4 {
  font-size: 1rem;
  margin: 0 0 2px;
}

.cart-info p {
  margin: 0;
  font-size: 0.9rem;
}

/* Cart Footer */
.cart-footer {
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.cart-footer .checkout-btn {
  width: 100%;
  background: #000;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.cart-footer .checkout-btn:hover {
  background: #333;
}

.shop-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.shop-controls input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 180px;
}

.shop-controls select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
}

#cartBtn {
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.shop-controls-wrapper {
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.shop-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.shop-controls input,
.shop-controls select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
}

.nav-list a.active {
  border-bottom: 2px solid #000;
  padding-bottom: 2px;
}

/* Utility */
.hidden {
  display: none !important;
}

/* ===========================
   ADMIN PAGE LAYOUT
=========================== */

main.admin {
  max-width: 900px;
  margin: 40px auto;
}

#authSection {
  margin-bottom: 30px;
}

#authSection h2 {
  margin-bottom: 10px;
}

/* Stack email + password nicely */
#authSection input[type="email"],
#authSection input[type="password"] {
  display: block;
  width: 260px;
  max-width: 100%;
  margin-bottom: 8px;
}

/* Auth buttons row */
#authSection .btn,
#authSection button {
  margin-top: 4px;
  margin-right: 6px;
}

/* Add Product card */
#addForm {
  max-width: 900px;
}

#addForm input[type="text"],
#addForm input[type="number"],
#addForm textarea {
  width: 100%;
  max-width: 260px;
  margin-bottom: 10px;
  display: block;
}

#addForm textarea {
  min-height: 80px;
  resize: vertical;
}

/* Products list */
#productsList {
  margin-top: 20px;
}

/* ===========================
   ADMIN PAGE STYLES
=========================== */

.admin-page {
  padding: 40px 0 80px;
  background: #f7f7f7;
}

.admin-panel {
  max-width: 900px;
  margin: 0 auto;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 24px;
}

.admin-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 24px 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  margin-bottom: 28px;
}

.admin-card h2 {
  margin-bottom: 12px;
}

.admin-msg {
  min-height: 18px;
  font-size: 0.9rem;
  color: #c0392b;
  margin-bottom: 10px;
}

.admin-fields input[type="email"],
.admin-fields input[type="password"] {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-bottom: 10px;
}

.admin-card button.btn {
  margin-top: 6px;
}

/* Dashboard layout */

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-subsection + .admin-subsection {
  margin-top: 24px;
}

.admin-form label {
  display: block;
  margin-bottom: 12px;
}

.admin-form span {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
}

.admin-form textarea {
  min-height: 80px;
  resize: vertical;
}

.admin-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-file input[type="file"] {
  margin-top: 4px;
}

.admin-form .btn {
  margin-top: 12px;
}

/* Products list */
.admin-products .product-item {
  margin-bottom: 14px;
}

.admin-products .product-item .thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}

/* ===========================
   SHOP PRODUCT GRID + CARDS
=========================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* up to 3 per row on wide screens */
  gap: 24px;
  padding: 32px 0 80px;
}

/* each product card */
.product-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 320px;      /* <-- keeps it from becoming a huge banner */
  margin: 0 auto;        /* center card in its grid cell */
}

.product-image-wrapper {
  width: 100%;
  height: 260px;          /* nice Shopify-style rectangle */
  background: #f3f3f3;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;    /* FULL IMAGE, NO CROP */
  padding: 10px;
}


.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* info area */
.product-info {
  padding: 14px 16px 18px;
}

.product-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.product-price {
  font-weight: 700;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 10px;
}

/* ===========================
   ADMIN PRODUCT GRID
=========================== */

.admin-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 16px;
  padding-bottom: 40px;
}

/* individual product card */
.admin-product-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 12px 14px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* product thumbnail */
.admin-product-thumb {
  width: 100%;
  height: 180px;
  object-fit: contain;     /* <-- show whole image, no crop */
  background: #f7f7f7;     /* clean backdrop if image doesn't fill */
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 6px;            /* small padding for better framing */
}


/* title + meta */
.admin-product-card h4 {
  margin: 4px 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.admin-product-meta {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 8px;
}

.admin-product-card .del {
  width: 100%;
  margin-top: 4px;
}

.admin-product-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

.admin-product-actions .btn {
  flex: 1;
}

/* =========================
   CART OVERLAY & SIDEBAR
   ========================= */

/* Dim background when cart is open */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35); /* soft dark blur */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 900;
}

#overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Cart panel on the right */
#cartSidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 100%;
  height: 100vh;
  background: #ffffff;
  box-shadow: -14px 0 30px rgba(15, 23, 42, 0.2);
  padding: 24px 24px 20px;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
  z-index: 950;

  display: flex;
  flex-direction: column;
}

#cartSidebar.open {
  transform: translateX(0);
}

/* Header */
#cartSidebar h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
}

#cartSidebar .cart-subtitle {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Cart items scroll area */
#cartItems {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  margin: 8px 0 16px;
}

/* Individual item (if you use this structure later) */
.cart-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-title {
  font-weight: 500;
}

.cart-item-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

/* Footer (total + checkout) */
.cart-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#cartTotalLabel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

#cartTotalLabel span {
  font-weight: 700;
}

/* Checkout button – same vibe as your other dark blue buttons */
#checkoutBtn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: #06243d; /* deep navy */
  color: #ffffff;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

#checkoutBtn:hover {
  background: #0b3053;
  transform: translateY(-1px);
}

#checkoutBtn:active {
  transform: translateY(0);
}

/* Cart sidebar close button */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.cart-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.cart-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.cart-close-icon {
  font-size: 18px;
  line-height: 1;
  color: #444;
}

.cart-close-btn:hover {
  background: #f3f3f3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.cart-close-btn:active {
  transform: translateY(0);
  box-shadow: none;
}



/* Make cart fullscreen-ish on small screens */
@media (max-width: 768px) {
  #cartSidebar {
    width: 100%;
    max-width: 420px;
  }
}

.blackCart {
  background: #000 !important;
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 600;
}

.blackCart:hover {
  background: #333 !important;
}

/* ===========================
   CUSTOMER AUTH PAGE
=========================== */
.auth-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: #f5f5f5;
}

.auth-card {
  background: #ffffff;
  padding: 30px 26px;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  max-width: 380px;
  width: 100%;
}

.auth-card h1 {
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 22px;
}

.auth-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.auth-label input {
  width: 100%;
  margin-top: 6px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

.auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.primary-btn,
.secondary-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-btn {
  background: #000;
  color: #fff;
}

.primary-btn:hover {
  background: #222;
}

.secondary-btn {
  background: #f3f4f6;
  color: #111827;
}

.secondary-btn:hover {
  background: #e5e7eb;
}

.auth-message {
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-bottom: 10px;
}

.auth-message.error {
  color: #c0392b;
}

.auth-message.success {
  color: #16a34a;
}

.auth-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 14px;
}

.address-warning {
  background: rgba(255, 193, 7, 0.15);
  border-left: 4px solid #ffc107;
  padding: 10px 12px;
  margin: 10px 0 15px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #7c5a00;
  line-height: 1.4;
}

/* Make textarea match input styles */
.auth-input,
textarea.auth-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s ease;
  box-sizing: border-box; 
}

/* Textarea-specific adjustments */
textarea.auth-input {
  height: 80px;      /* same visual height as inputs */
  resize: none;      /* prevents resizing handles */
  line-height: 1.4;
}

/* Input + textarea: focus highlight */
.auth-input:focus,
textarea.auth-input:focus {
  border-color: #333;
}

/* creating account */
.field {
  margin-bottom: 14px;
}

.error-message {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #e53935;       /* red */
}

.input-error {
  border-color: #e53935 !important;
  background-color: #fff5f5;
}

/* ===== Orders page ===== */

.orders-page {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.orders-header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.orders-header p {
  color: #6b7280; /* subtle gray */
  margin-bottom: 1.5rem;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Individual order card */
.order-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.order-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-header h3 {
  margin-bottom: 4px;
}

.order-header p {
  margin: 0;
}

.order-header p strong {
  font-weight: 600;
}

.order-items {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.order-item-row span:last-child {
  font-weight: 500;
}

/* Reuse your existing button style, just smaller */
.btn.small {
  padding: 6px 12px;
  font-size: 0.85rem;
}


.order-card {
  background: #fff;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.order-header p {
  margin: 4px 0;
}

.order-items {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* Layout for admin sidebar */
.admin-layout {
  display: flex;
  gap: 2rem;
}

/* Sidebar */
.admin-sidebar {
  width: 220px;
  padding: 1rem;
  background: #f1f5f9;
  border-radius: 12px;
  height: fit-content;
}

.admin-tab-btn {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.7rem 1rem;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.95rem;
}

.admin-tab-btn.active {
  background: #0f172a;
  color: white;
}

/* Tab sections */
.admin-tab-section.hidden {
  display: none;
}

/* Make admin layout wider */
.admin-panel {
  max-width: 1400px;    /* Increase width */
  width: 100%;
}

/* Layout: sidebar + content */
.admin-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* Sidebar width stays the same */
.admin-sidebar {
  width: 240px;
}

/* Main content takes the rest of the space */
.admin-content {
  flex: 1;
  min-width: 0; /* prevents overflow issues */
}

/* Allow admin cards to stretch fully */
.admin-card {
  width: 100%;
}

/* =========================================================
   PROFILE / ACCOUNT PAGE 
   ========================================================= */

/* Main area for the profile page */
/* Center profile card both vertically and horizontally */
/* Main area for the profile page */
.auth-page {
  background: #f9fafb;        /* same light background as rest of site */
  padding: 4rem 1rem 5rem;    /* top & bottom spacing */
}

/* Container for the card */
.auth-container {
  max-width: 640px;
  margin: 0 auto;             /* center the container horizontally */
}

/* Card that holds the profile form */
.auth-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem 2.25rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
  margin: 0 auto;             /* ensure the card itself is centered */
}

/* Title + subtitle */
.auth-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: #111827;
}

.auth-subtitle {
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
  color: #6b7280;
}

/* Message area (error/success/info) */
.auth-message {
  margin: 0 0 1rem 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.85rem;
}

.auth-message.error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
}

.auth-message.success {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #166534;
}

.auth-message.info {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

/* Form layout */
.profile-form {
  display: flex;
  flex-direction: column;
}

/* Each label + input pair */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.auth-field span {
  font-size: 0.85rem;
  color: #374151;
}

/* All inputs in the profile form */
.auth-field input {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input::placeholder {
  color: #9ca3af;
}

.auth-field input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.4);
}

/* Buttons in the profile card */
.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
}

/* Primary button already has .btn.primary styles;
   we just ensure full width here */
#saveProfileBtn.btn.primary.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Logout button below form */
#profileLogoutBtn.btn.secondary {
  width: 100%;
  margin-top: 1rem;
}

#profileAvatarChange.btn.secondary,
#profileLogoutBtn.btn.secondary {
  color: #153957;
  background: #e5e7eb;
  border: 1px solid #64748b;
}

#profileAvatarChange.btn.secondary:focus-visible,
#profileLogoutBtn.btn.secondary:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .auth-card {
    padding: 1.75rem 1.5rem;
  }

  .auth-title {
    font-size: 1.5rem;
  }
}

/* =========================================================
   Profile avatar
   ========================================================= */

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  font-weight: 600;
  font-size: 1.5rem;
  color: #111827;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* shown when we have an avatar URL */
}

.profile-avatar-initials {
  pointer-events: none;
}

.profile-avatar-btn {
  font-size: 0.85rem;
  padding-inline: 1rem;
  padding-block: 0.45rem;
}
 /* ------------ PROFILE PICTURE ----------- */
/* Profile icon button used in the navbar */
#profileButton {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background-color: #ffffff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== Admin tables (Orders + Users) ===== */

.admin-subsection {
  margin-top: 18px;
  overflow-x: auto; /* safe on small screens */
}

/* base table */
table.admin-table {
  width: 100%;
  border-collapse: collapse;            /* merge borders */
  background: #ffffff;
  font-size: 14px;
}

/* header */
.admin-table thead {
  background: #f5f7fa;
}

/* cells */
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border: 1px solid #d4d4d4;           /* <— this actually draws the borders */
  text-align: left;
  vertical-align: middle;
}

/* zebra rows */
.admin-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* hover highlight */
.admin-table tbody tr:hover {
  background: #eef2ff;
}

/* controls inside table */
.admin-table select {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
}

.admin-table button {
  padding: 4px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background: #0b2f6a;
  color: #fff;
  font-size: 13px;
}

.admin-table button + button {
  margin-left: 4px;
}

.admin-table button:hover {
  background: #1350a3;
}

/* ===== Order Items Modal ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  width: 600px;
  max-width: 95%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  padding: 12px 18px 18px;
  overflow-y: auto;
}

/* slightly smaller cells inside modal */
.modal-table th,
.modal-table td {
  font-size: 13px;
  padding: 8px 10px;
}

/* ===== Order status badges in Orders table ===== */

/* Make the select look like a pill/badge */
.order-status-select {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid transparent;
  background: #e5e7eb;
  color: #111827;
}

/* Add some spacing inside the Status cell */
td.status-cell {
  text-align: left;
}

/* Colors per status */
td[data-status="pending"] .order-status-select {
  background: #fef3c7;   /* amber-100 */
  border-color: #facc15; /* amber-400 */
  color: #92400e;
}

td[data-status="processing"] .order-status-select {
  background: #dbeafe;   /* blue-100 */
  border-color: #60a5fa; /* blue-400 */
  color: #1d4ed8;
}

td[data-status="shipped"] .order-status-select {
  background: #e0f2fe;   /* sky-100 */
  border-color: #38bdf8; /* sky-400 */
  color: #0369a1;
}

td[data-status="completed"] .order-status-select {
  background: #dcfce7;   /* green-100 */
  border-color: #4ade80; /* green-400 */
  color: #166534;
}

td[data-status="cancelled"] .order-status-select {
  background: #fee2e2;   /* red-100 */
  border-color: #f87171; /* red-400 */
  color: #b91c1c;
}

/* ===== Items modal: product image + text ===== */

.modal-product-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-product-image {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

/* ===== Orders controls row (status + search) ===== */

.admin-orders-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.orders-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orders-filter-group label {
  font-size: 14px;
}

/* ===== Homepage Admin Editor ===== */

.homepage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.homepage-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.homepage-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
}

.homepage-card label {
  display: block;
  font-weight: bold;
  margin-top: 12px;
}

.homepage-card input[type="text"],
.homepage-card input[type="file"] {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
}

.homepage-card button {
  margin-top: 12px;
  width: 100%;
}

/* -------------------------------------------------------------------------------------------------- */
/* Featured Products section */
.products {
  padding: 4rem 0 5rem;        /* adjust top/bottom spacing */
}

.products .section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

.product-card .product-media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.product-card .product-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.product-card .price {
  font-weight: 600;
  margin-bottom: 1rem;
}

.product-card .btn {
  margin-top: auto; /* pushes button to bottom of card */
}


/* ==============================
   PRODUCT VARIANT PANEL
   (Shop page - size & color selector)
============================== */

.variant-panel.hidden {
  display: none;
}

.variant-panel {
  position: fixed;
  inset: 0;
  z-index: 60; /* above cart sidebar */
}

.variant-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.variant-dialog {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.75rem;
}

.variant-close-btn {
  align-self: flex-end;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #4b5563;
}

.variant-content {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  overflow-y: auto;
}

.variant-left {
  flex-shrink: 0;
}

.variant-main-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.variant-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.variant-name {
  font-size: 1.1rem;
  margin: 0;
}

.variant-price {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.variant-group h4 {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-group .chip {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip-group .chip.active {
  border-color: #052c65;   /* your dark blue */
  background: #052c65;
  color: #ffffff;
}

.variant-stock-text {
  font-size: 0.8rem;
  color: #4b5563;
}

.variant-qty-input {
  width: 80px;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.link-btn {
  margin-top: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  color: #052c65;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

/* On small screens, make the panel full width */
@media (max-width: 640px) {
  .variant-dialog {
    width: 100%;
  }

  .variant-content {
    flex-direction: column;
    align-items: center;
  }

  .variant-left {
    justify-content: center;
  }
}

/* ========================
   ADMIN PRODUCT VARIANTS
======================== */

.admin-product-variants {
  margin-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
}

.btn-xs {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
}

.variants-panel {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.variants-list-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.variant-main {
  display: flex;
  flex-direction: column;
}

.variant-label {
  font-weight: 500;
}

.variant-meta {
  color: #4b5563;
}

.variant-form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.variant-form-row input[type="text"],
.variant-form-row input[type="number"] {
  flex: 1;
  padding: 0.25rem 0.45rem;
  font-size: 0.8rem;
}

/* ==============================
   ADMIN VARIANTS MODAL
============================== */

.admin-variant-modal.hidden {
  display: none;
}

.admin-variant-modal {
  position: fixed;
  inset: 0;
  z-index: 70; /* above normal admin card content */
}

.admin-variant-dialog {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-variant-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.admin-variant-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-bottom: 0.5rem;
}

.admin-variant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
}

.admin-variant-main {
  display: flex;
  flex-direction: column;
}

.admin-variant-label {
  font-weight: 500;
}

.admin-variant-meta {
  color: #4b5563;
}

.admin-variant-form {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.5rem;
}

.admin-variant-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.admin-variant-row input[type="text"],
.admin-variant-row input[type="number"] {
  flex: 1;
  padding: 0.3rem 0.45rem;
  font-size: 0.8rem;
}

/* reuse from shop variant for overlay/close */
.variant-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.variant-close-btn {
  align-self: flex-end;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #4b5563;
}

.admin-variant-dialog {
  /* existing styles... */
  padding: 1.25rem 1.75rem 1.75rem; /* a bit more side/bottom padding */
}

.admin-variant-form {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.admin-variant-row:last-child input[type="number"] {
  flex: 1.1;
}

.admin-variant-row:last-child .btn-sm {
  flex: 0 0 auto;
}

.admin-variant-item {
  padding: 0.45rem 0;
}

.admin-variant-label {
  line-height: 1.2;
}

.admin-variant-meta {
  line-height: 1.2;
}

/* --------------------------------- VARIANT EDITOR ---------------------------*/
.variant-form-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: white;
}

.variant-form-container input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 5px;
}

.variant-add-btn {
  width: 100%;
  padding: 0.55rem 0;
  background-color: #0b2347;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s ease;
}

.variant-add-btn:hover {
  background-color: #0a1d3a;
}

/* -------------------- TOAST --------------------*/
/* Toast container */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999999;
}

/* Toast base style */
.toast {
  min-width: 200px;
  padding: 12px 18px;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateX(20px);
  animation: toastIn 0.25s forwards, toastOut 0.4s forwards 2.8s;
}

/* Success color */
.toast.success {
  background-color: #16a34a; /* green */
}

/* Error color */
.toast.error {
  background-color: #dc2626; /* red */
}

/* Entrance animation */
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Exit animation */
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ==============================
   SIZE GUIDE MODAL (SHOP)
============================== */

.size-guide-modal.hidden {
  display: none;
}

.size-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.size-guide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.size-guide-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(420px, 90%);
  max-height: 80vh;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.25rem 1.25rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.size-guide-close {
  align-self: flex-end;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  color: #4b5563;
}

.size-guide-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.size-guide-image {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

/* ==============================
   Variant option chips (shop)
============================== */

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0.25rem 0.75rem;
  background: #ffffff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
}

.chip.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.chip.out-of-stock {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Stock text below options */
.variant-stock-text {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #4b5563;
}

/* Disabled add-to-cart */
.btn[disabled],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Out-of-stock variant chips */
.chip.out-of-stock {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Stock text inside variant panel */
.variant-stock-text {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #4b5563;
}

/* Disabled main buttons */
.btn[disabled],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-product-visibility {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.admin-product-visibility.is-visible {
  background-color: #e6ffec;
  color: #137333;
}

.admin-product-visibility.is-hidden {
  background-color: #ffeaea;
  color: #b3261e;
}

.admin-visibility-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-product-visibility {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.admin-product-visibility.is-visible {
  background-color: #e6ffec;
  color: #137333;
}

.admin-product-visibility.is-hidden {
  background-color: #ffeaea;
  color: #b3261e;
}

/* small text-style button */
.btn-link {
  border: none;
  background: none;
  padding: 0;
  font-size: 0.8rem;
  color: #0b5ed7;
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.25rem;
}

.badge-preorder {
  background-color: #ffcc66;
  color: #663300;
}

.product-meta,
.cart-preorder-note {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

/* Make it a bit more visible on hover */
.admin-table tbody tr:hover {
  filter: brightness(0.98);
}

/* Base row style */
.admin-table tbody tr {
  transition: background-color 0.15s ease;
}

/* --------------------------------- PRE-ORDER BADGE ---------------------------*/
.badge-preorder {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  background-color: #ff9800;
  color: #fff;
}


.po-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ff9800;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: default;
}

/*-------------------------------------- ORDERS --------------------------*/
.pill.pre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  color: #8a6d3b;
  font-size: 12px;
}

.muted {
  color: #666;
  font-size: 12px;
  margin-top: 4px;
}

/*---------------------- ADMIN NOTES -----------------*/
#modalAdminNotes {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;

  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;

  border-radius: 8px;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  color: #111827;

  resize: vertical;
  transition: border-color 0.2s ease,
              box-shadow 0.2s ease,
              background-color 0.2s ease;
}

#modalAdminNotes::placeholder {
  color: #9ca3af;
}

#modalAdminNotes:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#modalAdminNotes {
  margin-bottom: 12px;
}

/*--------------------------------- PAYMENT ---------------------------*/
.payment-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fafafa;
}

.payment-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0;
  flex-wrap: wrap;
}

.payment-upload {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.proof-msg {
  font-size: 0.9rem;
  opacity: 0.8;
}

.proof-link {
  text-decoration: underline;
}

.proof-status.status-none { opacity: 0.8; }
.proof-status.status-submitted { font-weight: 700; }
.proof-status.status-approved { font-weight: 700; }
.proof-status.status-rejected { font-weight: 700; }

.proof-reason{
  margin-top: 6px;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ----------------------- PAYMENT METHOD MODAL ------------------------*/
.pmodal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 4vw, 32px); box-sizing: border-box; }
.pmodal-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 37, .58); backdrop-filter: blur(3px); }
.pmodal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(720px, calc(100dvh - 24px));
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f8fbff;
  border: 1px solid rgba(11, 47, 84, .14);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 24px 70px rgba(4, 18, 37, .3);
  box-sizing: border-box;
}
.pmodal-card h3 { margin: 0 0 16px; color: #0b2f54; font-size: clamp(1.25rem, 3vw, 1.55rem); line-height: 1.2; }
#checkoutReview { margin: 0 0 14px; padding: 14px 16px; background: #fff; border: 1px solid #d8e3ef; border-radius: 12px; color: #23384e; font-size: .96rem; line-height: 1.55; }
#checkoutTotal { margin: 0 0 10px; color: #0b2f54; font-size: 1.08rem; }
.pmodal-card > p:not(#checkoutTotal) { margin: 0 0 14px; color: #53677b; line-height: 1.5; }
.pmodal-card label { display: flex !important; align-items: center; gap: 9px; margin: 0 0 14px !important; padding: 12px 14px; background: #eaf3fc; border: 1px solid #bcd4e9; border-radius: 11px; color: #0b2f54; font-weight: 700; }
.pmodal-card input[type="radio"] { accent-color: #0b4f86; }
.gcash-instructions { margin-top: 2px !important; padding: 15px 16px !important; background: #eef8f2; border: 1px solid #b9dfc7; border-radius: 12px; color: #214d32; line-height: 1.5; }
.gcash-instructions strong { color: #174c2c; }
.gcash-instructions ol { margin: 8px 0 0 20px !important; padding: 0; }
.pmodal-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; margin-top: 18px; }
.pmodal-actions button { min-height: 44px; width: 100%; border: 1px solid #0b4f86; border-radius: 10px; padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer; }
#paymentCancelBtn { background: #fff; color: #0b4f86; }
#paymentConfirmBtn { background: #0b4f86; color: #fff; }
.pmodal-actions button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 480px) { .pmodal { padding: 10px; align-items: flex-end; } .pmodal-card { max-height: calc(100dvh - 20px); border-radius: 18px 18px 12px 12px; padding: 20px 16px 16px; } .pmodal-actions { grid-template-columns: 1fr 1fr; } }

/*-------------------------- REJECT REASON MODAL ---------------------------*/
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-card {
  position: relative;
  background: #fff;
  width: 420px;
  max-width: 90%;
  margin: 15vh auto;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.modal-card h3 {
  margin-bottom: 10px;
}

.modal-card textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 15px;
}

.btn.secondary {
  background: #e5e7eb;
}

.btn.danger {
  background: #0b2f6a;
  color: #fff;
}

/* ================================
   FORCE CENTER REJECT MODAL
   ================================ */

#rejectModal.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}

#rejectModal.modal-overlay.hidden {
  display: none;
}

/* OVERRIDE global .modal positioning */
#rejectModal .modal {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;

  width: 520px;
  max-width: 100%;
  max-height: calc(100vh - 48px);

  margin: 0 !important;

  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
  overflow: auto;
}

/* textarea style matches admin UI */
#rejectModal textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.2);
  font: inherit;
}

/* footer button alignment */
#rejectModal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* remove any danger/red overrides */
#rejectModal .btn.danger {
  background: inherit;
  color: inherit;
  border-color: inherit;
}

#rejectModal #cancelReject {
  background: inherit;
  color: var(--primary-color, #0b3a6f);
  border: 2px solid var(--primary-color, #0b3a6f);
}


#rejectModal #cancelReject {
  background-color: var(--primary-color, #0b3a6f);
  color: #ffffff;
  border: none;
}

button,
.btn {
  cursor: pointer;
}

/* All standard modals (Order Items, Reject, etc.) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}

.modal-overlay.hidden {
  display: none;
}

/* Override legacy modal positioning */
.modal {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;

  width: min(700px, 100%);
  max-height: calc(100vh - 48px);

  margin: 0 !important;

  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
  overflow: auto;
}

/* --- Low stock badges (Admin) --- */
.stock-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  vertical-align: middle;
}

.stock-badge.ok {
  background: #eef6ff;
  color: #0b2a4a;
  border-color: #cfe6ff;
}

.stock-badge.low {
  background: #fff6e6;
  color: #5a3b00;
  border-color: #ffd89a;
}

.stock-badge.out {
  background: #f2f2f2;
  color: #333;
  border-color: #d0d0d0;
}

/* --- Cart stock warning (Shop) --- */
.cart-stock-warning {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ffd89a;
  background: #fff6e6;
  color: #5a3b00;
  font-size: 14px;
}

.cart-stock-warning ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.cart-stock-warning li {
  margin: 4px 0;
}

/* Optional: disabled checkout styling */
#checkoutBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Inline qty warning under the + / - controls */
.qty-inline-msg {
  margin-top: 6px;
  font-size: 12px;
  color: #b45309; /* warm amber */
}

/* Optional: clearer disabled + */
.cart-item .qty-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/*---------------------------------- ORDER STATUS TIMELINE --------------------------------*/
/* Order status timeline */
.order-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}

.tl-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #0b2a45;
  background: #fff;
  flex: 0 0 auto;
}

.tl-label {
  font-size: 13px;
  color: #0b2a45;
  font-weight: 600;
}

.tl-line {
  height: 2px;
  width: 46px;
  background: rgba(11, 42, 69, 0.25);
  border-radius: 999px;
}

/* States */
.tl-step.done .tl-dot {
  background: #0b2a45;
}

.tl-line.done {
  background: #0b2a45;
}

.tl-step.active .tl-dot {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 42, 69, 0.12);
}

.tl-step.active .tl-label {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .tl-line { width: 26px; }
  .tl-step { min-width: auto; }
}

/* Orders: highlight current timeline step */
.order-timeline .tl-step.current .tl-label {
  font-weight: 800;
}

.order-timeline .tl-step.current .tl-dot {
  transform: scale(1.1);
}

/* Helper text under timeline */
.order-timeline-helper {
  margin-top: 10px;
  font-size: 0.95rem;
  opacity: 0.85;
}

.order-highlight {
  outline: 2px solid #22c55e;
  outline-offset: 4px;
  border-radius: 8px;
}

/* ========== MOBILE HEADER (isolated - does not touch desktop) ========== */
/* ========== MOBILE HEADER (isolated - does not touch desktop) ========== */

/* Desktop default: show desktop header, hide ALL mobile header elements */
.m-header,
.m-backdrop,
.m-drawer,
.m-profile-dropdown {
  display: none !important;
}

/* Desktop default: ensure desktop header is visible */
.site-header {
  display: block; /* keep your sticky header working */
}

/* Mobile: hide desktop header, show mobile header + drawer container */
@media (max-width: 768px) {
  .site-header { display: none; }

  .m-header { display: block !important; }
  .m-drawer { display: block !important; }

  /* Backdrop stays hidden until JS adds a class to show it */
  .m-backdrop { display: none !important; }

  /* Your existing mobile header layout */
  .m-announce {
    background: #d10000;
    color: #fff;
    text-align: center;
    padding: 10px 12px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .5px;
  }

  .m-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border-bottom: 1px solid #eee;
  }

  .m-brand {
    justify-self: center;
    text-decoration: none;
    color: #111;
    font-weight: 900;
    font-size: 18px;
  }

  .m-btn {
    min-height: 44px;
    min-width: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 18px;
    text-decoration: none;
  }

  .m-right {
    justify-self: end;
    display: inline-flex;
    gap: 10px;
    align-items: center;
  }

  .m-cart {
    padding: 0 10px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 14px;
    min-width: auto;
  }

  .m-profile-btn {
    min-height: 44px;
    min-width: 44px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
  }

  /* Drawer + backdrop */
  .m-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999;
  }

  .m-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 340px);
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transform: translateX(-105%);
    transition: transform 220ms ease;
    border-right: 1px solid #eee;
  }
  .m-drawer.open { transform: translateX(0); }

  .m-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid #eee;
  }

  .m-links {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
  }

  .m-links a {
    padding: 12px 6px;
    text-decoration: none;
    color: #111;
    font-weight: 700;
    border-bottom: 1px solid #f1f1f1;
  }

  /* Mobile profile dropdown spacing (less tight) */
  .m-profile-dropdown {
    position: absolute;
    top: 72px;
    right: 12px;
    width: 260px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0,0,0,.16);
    z-index: 1300;
    padding: 6px 0;
    display: none; /* JS toggles */
  }

  .m-profile-dropdown .profile-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f1f1;
  }

  .m-profile-dropdown .dropdown-item {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
  }

  .m-profile-dropdown .dropdown-item:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
  }

  .m-profile-dropdown .dropdown-item:hover {
    background: #f9fafb;
  }

  .m-profile-dropdown { display: none; }
  .m-profile-dropdown.open { display: block !important; }


}

/* ===== DESKTOP SAFETY NET ===== */
@media (min-width: 769px) {
  .site-header { display: block !important; }

  .m-header,
  .m-backdrop,
  .m-drawer,
  .m-profile-dropdown {
    display: none !important;
  }
}

/* =========================
   DESKTOP NAV LOCK
   Guarantees desktop header/nav styles remain unchanged.
   ========================= */
@media (min-width: 769px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.9));
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(6px);
    display: block !important;
  }

  .header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem var(--site-padding);
  }

  .site-nav { margin-left: 1rem; flex: 1; display: block; }

  .nav-list {
    display: flex !important;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  /* Safety: never show mobile header/drawer on desktop */
  .m-header,
  .m-backdrop,
  .m-drawer,
  .m-profile-dropdown {
    display: none !important;
  }
}

/* =========================
   SHOP – MOBILE INSPIRED LAYOUT
   ========================= */

/* Desktop default: hide the mobile toolbar */
.shop-mobile-toolbar {
  display: none;
}

@media (max-width: 768px) {

  /* Show mobile toolbar */
  .shop-mobile-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px 14px;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
  }

  .shop-filter-btn {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
  }

  .shop-count {
    font-size: 13px;
    opacity: 0.7;
  }

  /* Hide search/sort controls by default (like Shopify) */
  .shop-controls-wrapper {
    display: none;
  }

  /* Show controls only when user taps "Filter and sort" */
  body.show-shop-controls .shop-controls-wrapper {
    display: block;
  }

  /* 2-column product grid */
  .product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Product card simplified */
  .product-card {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
  }

  .product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f4f4f4;
  }

  .product-info {
    padding: 10px;
  }

  .product-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-price {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
  }

  /* Hide extra text + button on grid (clean like inspiration) */
  .product-desc,
  .product-meta,
  .add-to-cart {
    display: none !important;
  }
}

/* =========================
   SHOP – MOBILE (closer to inspiration)
   ========================= */

@media (max-width: 768px) {

  /* If your global CSS hides .site-header on mobile, that's fine now
     because shop.html has a real .m-header. */

  /* Toolbar */
  .shop-mobile-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 12px 14px;
    border-bottom: 1px solid #eee;
    margin-bottom: 14px;
  }

  /* Grid like inspiration */
  .product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  /* Card */
  .product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  /* Remove the “framed” image look */
  .product-image-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #f4f4f4;
  }

  /* Text centered like your inspiration */
  .product-info {
    padding: 12px 10px 14px;
    text-align: center;
  }

  .product-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    margin: 6px 0 8px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-price {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
  }

  /* Badge closer to inspiration (small pill) */
  .badge-preorder {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: #ff8a00;
    color: #fff;
    margin-top: 8px;
  }

  /* Clean grid: hide long text + button */
  .product-desc,
  .product-meta,
  .add-to-cart {
    display: none !important;
  }
}

.m-brand {
  font-weight: 700;
}

/* Mobile cart badge */
.cart-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d10000;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  display: none; /* shown by JS when count > 0 */
}

/* Ensure the cart button can anchor the badge */
#mCartBtn {
  position: relative;
}

/* =========================
   CART SIDEBAR – MOBILE SWIPE SUPPORT
   ========================= */
@media (max-width: 768px) {
  /* Allow smooth drag on touch devices */
  #cartSidebar {
    touch-action: pan-y;
    will-change: transform;
  }

  /* Prevent page from scrolling sideways while dragging */
  body.cart-dragging {
    overflow-x: hidden;
  }
}

/* =========================
   PRODUCT DETAILS PAGE
   ========================= */
.product-page {
  padding: 24px var(--site-padding);
}

.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.product-detail-media img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: #f4f4f4;
}



.product-detail-info h1 {
  margin: 0 0 8px;
}

.product-detail-price {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 10px;
}

.product-detail-desc {
  opacity: 0.9;
  line-height: 1.5;
  margin: 10px 0 16px;
}

.product-detail-variant {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.variant-block {
  margin-bottom: 12px;
}

.variant-label {
  font-weight: 800;
  margin-bottom: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-stock {
  margin: 10px 0 10px;
  font-weight: 700;
}

.variant-qty {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.variant-qty input {
  width: 80px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 768px) {
  .product-page { padding: 16px; }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .product-detail-media img {
    max-height: 420px;
    border-radius: 10px;
  }
}

/* Product page back button */
.product-back-btn {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #333;
}

.product-back-btn:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .product-back-btn {
    margin-bottom: 12px;
  }
}

/* =========================
   FILTER & SORT BOTTOM SHEET (MOBILE)
   ========================= */
.fs-overlay.hidden,
.fs-sheet.hidden {
  display: none;
}

@media (max-width: 768px) {
  body.fs-open {
    overflow: hidden;
  }

  .fs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 2000;
  }

  .fs-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2001;
    background: #fff;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.18);
  }

  .fs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
  }

  .fs-close {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
  }

  .fs-body {
    padding: 14px 16px;
    overflow: auto;
  }

  .fs-section {
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;
  }

  .fs-title {
    font-weight: 800;
    margin-bottom: 10px;
  }

  .fs-select, .fs-input {
    width: 100%;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 0 12px;
    font-weight: 600;
  }

  .fs-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
  }

  .fs-label {
    font-weight: 700;
    opacity: 0.8;
  }

  .fs-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .fs-chip {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .fs-chip.active {
    border-color: #000;
    background: #000;
    color: #fff;
  }

  .fs-toggle {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
    margin: 8px 0;
  }

  .fs-note {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.7;
  }

  .fs-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #fff;
  }

  .fs-btn {
    height: 44px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid #ddd;
  }

  .fs-btn.primary {
    background: #000;
    color: #fff;
    border-color: #000;
  }

  .fs-btn.secondary {
    background: #fff;
    color: #000;
  }
}

/* =========================
   PRODUCT IMAGE GALLERY
   ========================= */
.p-gallery { position: relative; }

.p-g-stage {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: #f4f4f4;
  overflow: hidden;
}

.p-g-stage img {
  width: 100%;
  height: 560px;
  object-fit: contain;
  display: block;
  background: #f4f4f4;
}

.p-g-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  font-size: 22px;
  font-weight: 900;
}

.p-g-nav.prev { left: 10px; }
.p-g-nav.next { right: 10px; }

.p-thumbs {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.p-thumb {
  border: 2px solid transparent;
  background: #fff;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  overflow: hidden;
}

.p-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-thumb.active { border-color: #000; }

@media (max-width: 768px) {
  .p-g-stage img { height: 420px; }
  .p-g-nav { display: none; } /* swipe is primary on mobile */
}

/* =========================
   PRODUCT LIGHTBOX (MOBILE)
   ========================= */
.p-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 14px;
}

.p-lightbox.open { display: flex; }

.p-lb-stage {
  width: 100%;
  height: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.p-lb-stage img {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.p-lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 2;
}

.p-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 2;
  display: none; /* default hidden on mobile */
}

.p-lb-nav.prev { left: 10px; }
.p-lb-nav.next { right: 10px; }

.p-lb-count {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 999px;
}

/* On larger screens, show arrows too */
@media (min-width: 769px) {
  .p-lb-nav { display: flex; }
}

/* ===========================
   ORDERS - MOBILE RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .orders-page {
    padding-top: 1.25rem;
    padding-bottom: 2.5rem;
  }

  .orders-header h1 {
    font-size: 1.5rem;
  }

  .order-card {
    padding: 14px;
    border-radius: 14px;
  }

  .order-header h3 {
    font-size: 1.05rem;
  }

  /* Make timeline usable on small screens (scroll instead of wrapping ugly) */
  .order-timeline {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .tl-step,
  .tl-label {
    white-space: nowrap;
  }

  .tl-line {
    flex: 0 0 auto;
  }

  /* Order items: stack name/price better */
  .order-item-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .order-item-row span:last-child {
    align-self: flex-end;
  }

  /* Payment area: stack vertically */
  .payment-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .payment-upload {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .payment-upload input[type="file"] {
    width: 100%;
  }

  .payment-upload .upload-proof-btn {
    width: 100%;
    min-height: 44px;
  }

  /* Make the "View Items" button full width on mobile */
  .order-header .toggle-items {
    width: 100%;
    min-height: 44px;
  }
}

/* Cart item layout (missing styles) */
.cart-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}

.cart-item-main {
  flex: 1;
  min-width: 0; /* prevents overflow */
}

.cart-item-main h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.2;
}

.cart-item-main p {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.qty {
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}

.remove-btn {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}

.cart-line-total {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* ===========================
   CART DRAWER - MOBILE
=========================== */
@media (max-width: 520px) {
  /* Make the drawer full width on mobile */
  .cart-sidebar {
    width: 100vw;
    right: -100vw;     /* hide fully off screen */
    padding: 16px;
  }

  .cart-sidebar.open {
    right: 0;
  }

  .cart-header {
    margin-bottom: 14px;
  }

  .cart-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
  }

  /* Stack cart item content nicely */
  .cart-item {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .cart-thumb {
    width: 56px;
    height: 56px;
  }

  .cart-item-main {
    flex: 1 1 calc(100% - 66px);
  }

  /* Put line total on its own line (cleaner) */
  .cart-line-total {
    flex: 1 1 100%;
    text-align: right;
    margin-top: -4px;
  }

  /* Controls: make remove button full width + easy tap */
  .cart-item-controls {
    gap: 10px;
  }

  .remove-btn {
    width: 100%;
    min-height: 44px;
  }

  .qty-btn {
    width: 40px;
    height: 40px;
  }

  /* Checkout button: bigger + pill */
  .cart-footer .checkout-btn {
    min-height: 50px;
    border-radius: 999px;
    font-size: 1rem;
  }
}

/* ===== CART: Fix half-visible checkout button on mobile ===== */

/* Use dynamic viewport height so the footer fits even with browser bars */
.cart-sidebar {
  height: 100dvh;          /* modern mobile browsers */
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Fallback for browsers without dvh */
@supports not (height: 100dvh) {
  .cart-sidebar {
    height: 100vh;
    max-height: 100vh;
  }
}

/* Make items scroll, keep footer visible */
.cart-items {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Stick footer and add safe area padding so button isn't cut */
.cart-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  z-index: 2;
}

/* Ensure button fully visible and not flush to bottom */
.checkout-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  margin-bottom: calc(6px + env(safe-area-inset-bottom));
}

.cart-content,
.cart-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===========================
   ADMIN: Widen main wrapper
=========================== */

/* Let admin page use more horizontal space */
.admin-page .container.admin-panel {
  max-width: 1600px;   /* increase width */
  width: 100%;
}

/* Optional: if you want FULL WIDTH (no cap), use this instead:
.admin-page .container.admin-panel { max-width: none; }
*/

/* Keep padding reasonable so it doesn't stick to the edges */
.admin-page .container.admin-panel {
  padding-left: 16px;
  padding-right: 16px;
}

/* If table still overflows, allow table area to scroll instead of the whole page */
.admin-page .admin-subsection {
  overflow-x: auto;
}
.admin-page .admin-table {
  width: 100%;
  min-width: 1100px; /* ensures columns don’t crush too much */
}

/* ===========================
   TOAST (modern alert)
=========================== */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translate(-50%, -10px);
  z-index: 9999;

  min-width: 220px;
  max-width: min(520px, calc(100vw - 24px));

  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(8, 24, 38, 0.92); /* deep navy */
  color: #fff;

  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);

  display: flex;
  align-items: center;
  gap: 10px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2dd4bf; /* teal accent */
  flex: 0 0 auto;
}

.toast .msg {
  font-size: 0.95rem;
  line-height: 1.2;
  margin: 0;
  flex: 1;
}

.toast .x {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 10px;
}

.toast .x:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Mobile: keep it nicer */
@media (max-width: 520px) {
  .toast {
    top: 12px;
  }
}
 /* ===== Toast should be hidden by default ===== */
#toast.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translate(-50%, -10px);
  z-index: 9999;

  min-width: 220px;
  max-width: min(520px, calc(100vw - 24px));

  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(8, 24, 38, 0.92);
  color: #fff;

  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);

  display: flex;
  align-items: center;
  gap: 10px;

  /* IMPORTANT: hidden by default */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

/* Only visible when showToast adds .show */
#toast.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s;
}

/* If empty, don’t take space / don’t show pill */
#toast.toast:empty {
  display: none;
}

/* Toast inner elements */
#toast.toast .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2dd4bf;
  flex: 0 0 auto;
}

#toast.toast .msg {
  font-size: 0.95rem;
  line-height: 1.2;
  margin: 0;
  flex: 1;
}

#toast.toast .x {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 10px;
}

#toast.toast .x:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ===== Order payment status pills ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

/* Expired */
.pill.danger {
  background-color: #fdecea;
  color: #b42318;
  border: 1px solid #f5c2c7;
}

/* Active / Time left */
.pill.success {
  background-color: #ecfdf3;
  color: #027a48;
  border: 1px solid #a6f4c5;
}

/* Neutral / info */
.pill.info {
  background-color: #f2f4f7;
  color: #344054;
  border: 1px solid #d0d5dd;
}

@media (max-width: 600px) {
  .pill {
    font-size: 0.72rem;
    padding: 2px 8px;
  }
}

.order-status-select option[disabled] {
  font-weight: 600;
}

.site-footer {
  background: #f8f9fb;
  padding: 40px 20px;
  font-size: 14px;
}

.footer-grid {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.site-footer h4 {
  margin-bottom: 10px;
  font-weight: 600;
}

.site-footer ul {
  list-style: none;
  padding: 0;
}

.site-footer li {
  margin-bottom: 6px;
}

.site-footer a {
  text-decoration: none;
  color: #333;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* =========================
   Modern Admin (Manage Products)
   Paste at the bottom of your style.css
   ========================= */

:root{
  --admin-bg: #f6f7fb;
  --admin-card: #ffffff;
  --admin-border: #e6e8ef;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --admin-radius: 16px;
}

/* Page background */
.admin-page {
  background: var(--admin-bg);
  min-height: 100vh;
}

/* Main panel spacing */
.admin-panel {
  padding: 28px 0 60px;
}

/* Title */
.admin-panel .page-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--admin-text);
  margin: 18px 0 18px;
}

/* Layout: sidebar + content */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
}

/* Sidebar */
.admin-sidebar {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 14px;
  position: sticky;
  top: 90px;
}

.admin-tab-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 12px 12px;
  border-radius: 12px;
  text-align: left;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.admin-tab-btn:hover {
  background: #f3f4f6;
}

.admin-tab-btn.active {
  background: #0b2a4a;
  color: #fff;
  border-color: rgba(255,255,255,0.1);
}

.admin-tab-btn:active {
  transform: translateY(1px);
}

/* Card */
.admin-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 20px;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-card-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--admin-text);
}

.admin-subsection h3 {
  margin: 18px 0 12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--admin-text);
}

/* Form container */
.admin-form {
  background: #fbfcff;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 16px;
}

/* Make labels look like modern fields */
.admin-form label {
  display: block;
  margin-bottom: 12px;
}

.admin-form label > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-muted);
  margin-bottom: 6px;
}

/* Inputs */
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="date"],
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid #dbe0ea;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  background: #ffffff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.admin-form textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: #0b2a4a;
  box-shadow: 0 0 0 3px rgba(11, 42, 74, 0.12);
}

/* Form rows - make them grid */
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* If a row has only one label, it will just take one column nicely */
.admin-form-row > label {
  margin-bottom: 0;
}

/* Checkbox styling */
.admin-form label.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  background: #fff;
}

.admin-form label.checkbox span {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

/* File input block */
.admin-file input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
}

/* Hint */
.hint {
  display: block;
  margin-top: 6px;
  color: var(--admin-muted);
  font-size: 12px;
}

/* Buttons */
.btn,
button.btn {
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn.primary {
  background: #0b2a4a;
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 42, 74, 0.2);
}

.btn.primary:hover {
  box-shadow: 0 14px 28px rgba(11, 42, 74, 0.28);
}

.btn.ghost {
  background: transparent;
  border-color: #dbe0ea;
  color: #111827;
}

.btn:active {
  transform: translateY(1px);
}

/* Products grid */
.admin-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

/* Mobile */
@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .admin-form-row {
    grid-template-columns: 1fr;
  }
}

/* Product card button row */
/* Variant panel Buy Now button */
#variantBuyNow.btn.secondary{
  border: 1px solid #0b2b4c;
  background: #fff;
  color: #0b2b4c;
}

/* === Product card action buttons === */
.product-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
}

.product-actions .btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.product-actions .btn.primary {
  background-color: #0b2b4c;
  color: #ffffff;
  border: none;
}

.product-actions .btn.secondary {
  background-color: #ffffff;
  color: #0b2b4c;
  border: 2px solid #0b2b4c;
}

.product-actions .btn.primary:hover {
  background-color: #081f36;
}

.product-actions .btn.secondary:hover {
  background-color: #0b2b4c;
  color: #ffffff;
}

.product-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Blaziest modal ===== */
.bz-modal.hidden { display: none; }

.bz-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}

.bz-modal-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 18px 50px rgba(0,0,0,.2);
  padding: 14px;
}

.bz-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bz-modal-x {
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
}

.bz-modal-label {
  display: block;
  font-weight: 600;
  margin: 8px 0 6px;
}

.bz-modal-textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.15);
  padding: 10px;
  outline: none;
}

.bz-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

/* ===== Toast ===== */
.bz-toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 10px;
  z-index: 10000;
}

.bz-toast {
  background: #111;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  max-width: 320px;
}

.bz-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.bz-toast.success { background: #0f5132; }
.bz-toast.error { background: #842029; }

/* ===== Active nav link ===== */
.nav-active,
.nav-list a.nav-active {
  background: rgba(12, 52, 90, 0.08);
  color: var(--color-primary);
  font-weight: 700;
}

/* ===== Improved empty state for orders ===== */
.empty-orders {
  text-align: center;
  padding: 4rem 1rem;
  color: #6b7280;
}
.empty-orders .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
}
.empty-orders h3 {
  font-size: 1.2rem;
  color: #374151;
  margin: 0 0 0.5rem;
}
.empty-orders p {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

/* ===== Footer on orders/profile pages ===== */
.site-footer {
  margin-top: auto;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

/* Audit fixes */
body.drawer-open { overflow: hidden; }
#toast.toast.success .dot { background: #22c55e; }
#toast.toast.error .dot { background: #ef4444; }
#toast.toast.warning .dot { background: #f59e0b; }
#toast.toast.error { border-color: rgba(239,68,68,.45); }
#toast.toast.success { border-color: rgba(34,197,94,.4); }

/* ===== MOBILE CART INTERACTION FIX ===== */
body.cart-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  #mCartBtn,
  .m-cart {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #cartSidebar {
    width: min(100vw, 420px);
    max-width: 100vw;
  }
}






/* Hide Our Story on localhost and Netlify */
.site-nav .nav-list > li:has(> a:is(
    [href="about.html"],
    [href="/about.html"],
    [href="about"],
    [href="/about"]
)),
.m-links > a:is(
    [href="about.html"],
    [href="/about.html"],
    [href="about"],
    [href="/about"]
) {
    display: none !important;
}
