/* ============================================================
   STOREKITT — shop.css (shop + admin)
   ============================================================ */
* { box-sizing: border-box; }
body { margin: 0; padding: 0; background: #fafafa; font-family: 'Cabin', Arial, sans-serif; color: #262626; }

/* ---------- NAV ---------- */
.site-nav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 14px 32px; background: #fafafa; border-bottom: 1px solid #e6e6e6; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; }
.nav-logo span { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #999; text-decoration: none; padding-bottom: 3px; transition: color .25s; }
.nav-links a:hover { color: #262626; }
.nav-links a.active { color: #262626; border-bottom: 2px solid #262626; }
.nav-right { display: flex; align-items: center; gap: 6px; margin-left: 22px; }
.nav-cart { display: flex; align-items: center; position: relative; color: #262626; padding: 6px; }
.cart-badge { position: absolute; top: -4px; right: -6px; background: #262626; color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle .ico-close { display: none; }
.nav-toggle.open .ico-menu { display: none; }
.nav-toggle.open .ico-close { display: block; }

/* ---------- CONTENT ---------- */
.shop-wrap { max-width: 760px; margin: 0 auto; padding: 70px 20px 100px; text-align: center; }
.shop-wrap h1 { font-family: 'Montserrat', sans-serif; font-size: 42px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; margin: 0 0 16px; }
.shop-sub { font-size: 16px; line-height: 1.8; color: #666; max-width: 560px; margin: 0 auto 34px; }
.shop-error { font-size: 14px; color: #b00020; }
.shop-note { font-size: 14px; color: #2e7d32; }
.shop-input { font-size: 15px; padding: 13px 16px; border: 1px solid #ddd; border-radius: 10px; font-family: inherit; width: 100%; }
.shop-input:focus { outline: none; border-color: #262626; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; text-decoration: none; padding: 13px 28px; border-radius: 999px; transition: all .25s; cursor: pointer; border: 2px solid #262626; font-family: inherit; }
.btn-outline { color: #262626; background: transparent; }
.btn-outline:hover { color: #fff; background: #262626; }
.btn-dark { color: #fff; background: #262626; }
.btn-dark:hover { color: #262626; background: transparent; }
.link-btn { font-size: 13px; color: #999; background: none; border: none; cursor: pointer; text-decoration: underline; display: inline-flex; align-items: center; gap: 5px; font-family: inherit; }
.link-btn:hover { color: #262626; }

/* ---------- CART ---------- */
.cart-lines { max-width: 640px; margin: 0 auto 8px; text-align: left; }
.cart-line { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid #e6e6e6; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.05); padding: 16px 20px; margin-bottom: 14px; }
.cart-line-img { flex: 0 0 76px; height: 76px; background: #fafafa; border: 1px solid #e6e6e6; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-line-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { display: block; font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.cart-line-unit { display: block; font-size: 13px; color: #999; margin-bottom: 10px; }
.qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.qty-stepper button { width: 34px; height: 34px; background: #fafafa; border: none; font-size: 17px; cursor: pointer; font-family: inherit; }
.qty-stepper button:hover { background: #efefef; }
.qty-val { min-width: 40px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; border-left: 1px solid #ddd; border-right: 1px solid #ddd; }
.cart-line-right { text-align: right; }
.cart-line-price { display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 900; margin-bottom: 8px; }
.cart-summary { max-width: 640px; margin: 26px auto 0; }
.cart-subtotal { display: flex; justify-content: space-between; align-items: center; background: #262626; color: #fff; border-radius: 14px; padding: 18px 24px; font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; }
.cart-subtotal span:last-child { font-size: 24px; }
.cart-note { font-size: 13px; color: #999; margin: 14px 0 22px; text-align: center; }
.cart-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.checkout-summary { list-style: none; margin: 0 auto 30px; padding: 8px 26px; max-width: 480px; background: #fff; border: 1px solid #e6e6e6; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.05); text-align: left; }
.checkout-summary li { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; color: #555; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.checkout-summary li:last-child { border-bottom: none; }
.checkout-summary .cs-total { font-family: 'Montserrat', sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; font-size: 15px; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state svg { opacity: .18; margin-bottom: 20px; }
.empty-state p { font-size: 16px; color: #777; margin: 0 0 26px; }
.success-ico { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%; background: #262626; color: #fff; margin-bottom: 26px; }
.success-ico svg { width: 34px; height: 34px; }

/* ---------- ADMIN LAYOUT: sidebar left ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: 240px; flex: 0 0 240px; background: #fff; border-right: 1px solid #e6e6e6; padding: 24px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .side-logo { display: flex; align-items: center; gap: 10px; padding: 0 22px 22px; border-bottom: 1px solid #f0f0f0; margin-bottom: 14px; text-decoration: none; }
.admin-side .side-logo span { font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: #262626; }
.admin-side .side-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #bbb; padding: 12px 22px 6px; }
.admin-side nav a { display: flex; align-items: center; gap: 10px; padding: 11px 22px; font-size: 14px; font-weight: 700; color: #262626; text-decoration: none; border-left: 3px solid transparent; transition: all .2s; }
.admin-side nav a:hover { color: #262626; background: #fafafa; }
.admin-side nav a.active { color: #262626; background: #fafafa; border-left-color: #262626; }
.admin-side nav a .msg-badge { margin-left: auto; }
.msg-badge { display: inline-flex; align-items: center; justify-content: center; background: #262626; color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 50%; padding: 0 5px; }
.admin-main { flex: 1; min-width: 0; padding: 36px 40px 80px; }
.admin-main h1 { font-family: 'Montserrat', sans-serif; font-size: 28px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 24px; }

/* ---------- ADMIN CARDS / FORMS ---------- */
.admin-card { background: #fff; border: 1px solid #e6e6e6; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.04); padding: 22px 24px; margin-bottom: 20px; text-align: left; }
.admin-card form { display: flex; flex-direction: column; }
.admin-card form > * + * { margin-top: 0; }
.admin-card label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #999; margin: 0 0 6px; }
.admin-card .shop-input { margin-bottom: 16px; }
.admin-card textarea.shop-input { margin-bottom: 16px; }
.admin-card label + .shop-input { margin-top: 0; }
.admin-card .admin-section-title { margin-bottom: 18px; }
.admin-card form > label:first-of-type { margin-top: 0; }
.admin-card .shop-input { margin-bottom: 8px; }
.admin-card .shop-input:last-child { margin-bottom: 0; }
.admin-card label:last-child { margin-bottom: 0; }
.admin-card textarea.shop-input { resize: vertical; }
.admin-section-title { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 14px; }
.admin-logo-preview { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border: 1px solid #e6e6e6; border-radius: 12px; background: #fafafa; overflow: hidden; }
.admin-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-toolbar h1 { margin: 0; }

/* settings in columns */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.settings-grid .admin-card { height: 100%; }
.settings-grid .admin-card { margin-bottom: 0; }
@media only screen and (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }

/* products table */
.prod-table { width: 100%; border-collapse: collapse; }
.prod-table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #999; padding: 10px 12px; border-bottom: 2px solid #ececec; }
.prod-table td { padding: 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; vertical-align: middle; }
.prod-table img { width: 52px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid #e6e6e6; }

/* messages */
.msg-status { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 4px 12px; border-radius: 20px; }
.msg-status.new { background: #262626; color: #fff; }
.msg-status.read { background: #e6e6e6; color: #777; }
.msg-status.replied { background: #e8f5e9; color: #2e7d32; }
.msg-meta { font-size: 13px; color: #999; margin: 0 0 12px; }
.msg-text { font-size: 14px; line-height: 1.7; color: #555; background: #fafafa; border: 1px solid #ececec; border-radius: 10px; padding: 14px 16px; margin: 0 0 14px; white-space: pre-wrap; }
.msg-reply-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #999; margin: 0 0 6px; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 24px; transition: .3s; }
.slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.switch input:checked + .slider { background: #262626; }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* footer + toast */
.site-footer { text-align: center; font-size: 13px; color: #999; padding: 28px 20px; border-top: 1px solid #e6e6e6; background: #fafafa; }
.toast { position: fixed; bottom: 26px; right: 26px; z-index: 9999; background: #262626; color: #fff; font-size: 14px; font-weight: 700; padding: 14px 26px; border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.28); opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; pointer-events: none; }
.toast.toast-show { opacity: 1; transform: translateY(0); }

@media only screen and (max-width: 767px) {
  .admin-card { overflow-x: auto; }
  .site-nav { padding: 12px 18px; }
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid #e6e6e6; box-shadow: 0 20px 40px rgba(0,0,0,.10); max-height: 0; overflow: hidden; transition: max-height .3s; }
  .nav-links.open { max-height: 400px; }
  .nav-links li { border-top: 1px solid #f0f0f0; }
  .nav-links a { display: block; padding: 15px 22px; }
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; flex: none; height: auto; position: static; border-right: none; border-bottom: 1px solid #e6e6e6; padding: 14px 0; }
  .admin-main { padding: 24px 18px 60px; }
  .cart-line { flex-wrap: wrap; }
  .cart-line-right { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; }
  .toast { right: auto; left: 50%; transform: translate(-50%, 14px); }
  .toast.toast-show { transform: translate(-50%, 0); }
}
