:root{
  --bg:#111827;
  --card:#1f2937;
  --soft:#374151;
  --accent:#d4a017;
  --text:#f9fafb;
  --muted:#d1d5db;

  --product-name-color:#f9fafb;
  --product-description-color:#d1d5db;
  --product-price-color:#d4a017;

  --catalog-font-color:#efe4c8;
  --catalog-font-family:Georgia,"Times New Roman",serif;
  --catalog-product-name-font-family:Georgia,"Times New Roman",serif;

  --menu-product-name-color:#2f241d;
  --menu-description-color:#6e5544;
  --menu-price-color:#8a5a2b;
  --menu-background-color:#0b1220;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial,sans-serif;
  background:#0b1220;
  color:var(--text);
}

a{
  color:inherit;
  text-decoration:none;
}

.container{
  width:min(1180px,92%);
  margin:auto;
}

.hidden{display:none !important}
.muted{color:var(--muted);font-size:.92rem;margin-top:6px}
.small-help{font-size:.85rem;color:#94a3b8}

.header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(11,18,32,.95);
  backdrop-filter:blur(8px);
  border-bottom:1px solid #243041;
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 0;
  gap:12px;
}

.brand{
  font-size:1.2rem;
  font-weight:700;
  color:var(--accent);
}

.nav-links{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  align-items:center;
}

.header-actions{
  display:flex;
  gap:12px;
  align-items:center;
}

.btn{
  display:inline-block;
  background:var(--accent);
  color:#1a1a1a;
  padding:12px 18px;
  border-radius:10px;
  font-weight:700;
  border:none;
  cursor:pointer;
}

.btn.secondary{
  background:transparent;
  color:var(--text);
  border:1px solid #475569;
}

.btn.danger,.danger{
  background:#7f1d1d;
  color:#fff;
}

.hero{
  padding:72px 0 36px;
  background:linear-gradient(135deg,#111827,#3b0d0d);
}

.hero-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:24px;
  align-items:center;
}

.card{
  background:var(--card);
  border:1px solid #344154;
  border-radius:18px;
  padding:22px;
  box-shadow:0 10px 30px rgba(0,0,0,.2);
}

.section{padding:32px 0}
.grid{display:grid;gap:18px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}

.stat-box{
  background:#0f172a;
  border:1px solid #334155;
  border-radius:14px;
  padding:16px;
}

.stat-box span{
  display:block;
  color:var(--muted);
  margin-bottom:8px;
}

.stat-box strong{font-size:1.6rem}

.footer{
  padding:28px 0;
  border-top:1px solid #243041;
  color:#cbd5e1;
  margin-top:30px;
}

.notice{
  padding:12px 14px;
  border-radius:10px;
  background:#13233b;
  border:1px solid #28496f;
  margin-bottom:16px;
}

.success{background:#14532d;color:#fff}
.actions{display:flex;gap:10px;flex-wrap:wrap}
.inline-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.inline-check{display:flex;gap:8px;align-items:center}
.password-row{display:flex;gap:10px;align-items:end}
.password-row input{flex:1}
.toggle-password{white-space:nowrap}

input,textarea,select{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:1px solid #4b5563;
  background:#0f172a;
  color:#fff;
}

input[type="checkbox"]{width:auto}
label{display:block;margin:10px 0 6px;color:var(--muted)}
textarea{resize:vertical}
code{background:#0f172a;padding:4px 6px;border-radius:8px}

.table{width:100%;border-collapse:collapse}
.table th,.table td{
  padding:10px;
  border-bottom:1px solid #374151;
  text-align:left;
  vertical-align:top;
}

.badge{
  padding:6px 10px;
  border-radius:999px;
  background:#334155;
}

.price{
  color:var(--product-price-color);
  font-weight:700;
}

.old-price{
  text-decoration:line-through;
  color:#94a3b8;
  margin-right:8px;
  font-weight:400;
}

.discount-badge{
  display:inline-block;
  background:#7c2d12;
  color:#fff;
  padding:4px 8px;
  border-radius:999px;
  font-size:.8rem;
  font-weight:700;
}

/* Homepage */
.hero-media img{
  width:100%;
  max-width:560px;
  height:360px;
  object-fit:cover;
  border-radius:18px;
  display:block;
  margin-left:auto;
  border:1px solid #344154;
  box-shadow:0 12px 28px rgba(0,0,0,.28);
  background:#0f172a;
}

.homepage-media-section{padding:36px 0}

.homepage-media-section h2{
  margin:0 0 18px;
  color:var(--accent);
  font-size:1.7rem;
}

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}

.gallery-card{
  background:var(--card);
  border:1px solid #344154;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 24px rgba(0,0,0,.22);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.gallery-card:hover{
  transform:translateY(-2px);
  border-color:var(--accent);
  box-shadow:0 14px 30px rgba(0,0,0,.28);
}

.gallery-card img{
  width:100%;
  height:230px;
  object-fit:cover;
  display:block;
  background:#0f172a;
}

.video-wrap{
  max-width:1000px;
  margin:0 auto;
  background:var(--card);
  border:1px solid #344154;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(0,0,0,.24);
}

.video-wrap video{
  width:100%;
  display:block;
  background:#000;
  border-radius:18px;
}

/* Shared product/admin cards */
.product-row{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:16px 0;
  border-bottom:1px solid #374151;
  align-items:flex-start;
}

.product-row-main{
  display:flex;
  gap:14px;
  align-items:flex-start;
  flex:1;
}

.product-row-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-end;
}

.thumb,.product-preview img,.thumb-right{
  width:96px;
  height:96px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid #475569;
  background:#0f172a;
  flex-shrink:0;
}

.thumb-right{margin-left:auto}
.photo-fixed-right{display:flex;gap:14px;align-items:flex-start}
.photo-fixed-right .form-fields{flex:1}

.category-block,.category-order-block{margin-top:18px}
.category-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}

.product-card{
  background:#0f172a;
  border:1px solid #334155;
  border-radius:16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.product-card.clickable{
  cursor:pointer;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}

.product-card.clickable:hover{
  transform:translateY(-2px);
  border-color:#d4a017;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
}

.product-card-image{
  width:100%;
  height:180px;
  object-fit:cover;
  background:#111827;
}

.product-card-body{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.product-name{color:var(--product-name-color);font-size:1.06rem}
.product-description{color:var(--product-description-color)}

/* Order page */
.order-page-spaced{padding-top:34px}
.order-header{position:sticky;top:0;z-index:40}
.order-nav{gap:12px;align-items:center}
.order-nav-center{flex:1;min-width:0}

.cart-top-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(255,255,255,.18);
  background:#111827;
  color:#fff;
  border-radius:999px;
  padding:10px 14px;
  cursor:pointer;
  white-space:nowrap;
}

.cart-count-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  background:#d4a017;
  color:#111827;
  font-weight:800;
  font-size:.85rem;
  margin-left:8px;
}

.category-bar-fixed{
  position:sticky;
  top:72px;
  z-index:35;
  background:rgba(17,24,39,.98);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 8px 18px rgba(0,0,0,.18);
}

.mobile-category-scroller{
  display:flex;
  gap:10px;
  overflow-x:auto;
  white-space:nowrap;
  padding:12px 0;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.mobile-category-scroller::-webkit-scrollbar{display:none}

.mobile-category-pill{
  display:inline-flex;
  align-items:center;
  padding:10px 16px;
  border-radius:999px;
  background:#fff;
  color:#111827;
  text-decoration:none;
  font-weight:700;
  border:2px solid #e5e7eb;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.mobile-category-pill.active{
  background:#d4a017;
  color:#111827;
  border-color:#d4a017;
  box-shadow:0 0 0 2px rgba(212,160,23,.3);
}

.modern-order-layout{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(320px,.8fr);
  gap:24px;
  align-items:start;
}

.products-panel,.checkout-panel{min-width:0}
.order-topbar{display:block}

.cart-flash{
  min-height:52px;
  display:flex;
  align-items:center;
  opacity:0;
  transform:translateY(-6px);
  transition:.2s ease;
  margin:0 0 14px 0;
}

.cart-flash.show{
  opacity:1;
  transform:none;
  padding:12px 14px;
  border-radius:12px;
  background:#14532d;
  border:1px solid rgba(255,255,255,.14);
  color:#fff;
  font-weight:700;
}

.menu-category-section{
  margin-bottom:24px;
  scroll-margin-top:155px;
}

.menu-category-title-row{margin-bottom:10px}

.product-list{
  display:grid;
  gap:14px;
}

.clickable-order-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) 120px;
  gap:16px;
  align-items:start;
  padding:16px;
  cursor:pointer;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.clickable-order-card:hover{
  border-color:#d4a017;
  box-shadow:0 10px 24px rgba(0,0,0,.22);
  transform:translateY(-2px);
}

.clickable-order-card:active{transform:translateY(0)}

.product-copy{min-width:0}
.product-title{margin:0 0 8px;color:var(--product-name-color)}
.product-desc{margin:0 0 12px;color:var(--product-description-color)}
.product-pricing{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.product-price{color:var(--product-price-color)}

.product-image-fixed{
  width:120px;
  height:120px;
  justify-self:end;
  border-radius:16px;
  overflow:hidden;
  background:#f3f4f6;
  display:flex;
  align-items:center;
  justify-content:center;
}

.product-image-fixed img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.product-image-placeholder{font-size:42px}

.checkout-card{
  position:sticky;
  top:132px;
  border-radius:18px;
}

.cart-items{
  display:grid;
  gap:12px;
  margin-bottom:16px;
}

.cart-item-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:14px;
}

.cart-item-copy{min-width:0}

.cart-item-controls{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-end;
}

.qty-box{
  display:flex;
  align-items:center;
  gap:10px;
}

.qty-box button{
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid #d1d5db;
  background:#fff;
  cursor:pointer;
}

.invoice-box{
  display:grid;
  gap:8px;
  padding:14px 0;
  border-top:1px solid #e5e7eb;
  border-bottom:1px solid #e5e7eb;
  margin:12px 0;
}

.invoice-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
}

.invoice-row.total{font-size:1.1rem}

.checkout-fields{
  display:grid;
  gap:12px;
}

.checkout-fields label{
  display:grid;
  gap:6px;
  font-weight:600;
}

.checkout-fields input,.checkout-fields select{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid #d1d5db;
}

.two-cols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

/* Responsive */
@media (max-width:1100px){
  .modern-order-layout{grid-template-columns:1fr}
  .checkout-card{position:static}
}

@media (max-width:980px){
  .category-bar-fixed{top:64px}
  .menu-category-section{scroll-margin-top:145px}
  .hero-grid,.grid-3,.grid-2,.form-grid-2,.category-grid{grid-template-columns:1fr}
  .product-row{flex-direction:column}
  .product-row-actions{align-items:flex-start}
  .stats-grid{grid-template-columns:1fr}
  .thumb,.product-preview img,.thumb-right{width:78px;height:78px}
}

@media (max-width:900px){
  .hero-media img{
    max-width:100%;
    height:240px;
    margin:20px 0 0;
  }

  .homepage-media-section{padding:28px 0}
  .gallery-card img{height:200px}
}

@media (max-width:768px){
  .cart-top-link span:last-child{display:none}
  .product-image-fixed{width:96px;height:96px}
}

@media (max-width:640px){
  .header .nav{flex-wrap:wrap;gap:10px}
  .header-actions{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
  }

  .header-actions .btn{padding:8px 10px}
  .cart-top-link{font-size:.95rem;padding:8px 12px}
  .cart-count-badge{min-width:22px;height:22px;font-size:.8rem}
  .category-bar-fixed .container{padding-left:12px;padding-right:12px}
  .order-page-spaced{padding-top:22px}
  .mobile-category-pill{padding:9px 12px;font-size:.93rem}
  .mobile-category-pill.active{
    box-shadow:0 0 0 2px rgba(255,255,255,.18), 0 0 0 4px rgba(212,160,23,.35);
  }

  .clickable-order-card{
    grid-template-columns:minmax(0,1fr) 86px;
    gap:10px;
    padding:12px;
  }

  .product-image-fixed{
    width:86px;
    height:86px;
    border-radius:14px;
  }

  .product-title{font-size:1rem;line-height:1.25}
  .product-desc{font-size:.92rem;line-height:1.4}
  .checkout-fields input,.checkout-fields select{font-size:16px}
  .two-cols{grid-template-columns:1fr}
}