/* ============================================================
   Modern Theme — OpenCart 4.x
   ============================================================ */

/* Google Fonts — Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --brand:         #2563eb;
  --brand-dark:    #1d4ed8;
  --brand-light:   #eff6ff;
  --accent:        #f59e0b;
  --text-primary:  #111827;
  --text-secondary:#6b7280;
  --text-muted:    #9ca3af;
  --surface:       #ffffff;
  --surface-alt:   #f9fafb;
  --border:        #e5e7eb;
  --border-strong: #d1d5db;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --shadow-xs:     0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:     0 2px 8px rgba(0,0,0,.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 40px rgba(0,0,0,.12);
  --transition:    .2s ease;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; height: auto; }

/* ── Layout ─────────────────────────────────────────────────── */
#container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ── Alert ──────────────────────────────────────────────────── */
#alert {
  z-index: 9999;
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 90vw);
}
#alert .alert { border-radius: var(--radius-md); box-shadow: var(--shadow-md); border: none; }
#alert .alert-success  { background: #ecfdf5; color: #065f46; }
#alert .alert-danger   { background: #fef2f2; color: #991b1b; }
#alert .alert-warning  { background: #fffbeb; color: #92400e; }
#alert .alert-info     { background: #eff6ff; color: #1e40af; }

/* ── Top Bar ────────────────────────────────────────────────── */
#top {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: 0;
  font-size: 13px;
}

#top .container { padding-top: 0; padding-bottom: 0; }

#top ul.list-inline { margin-bottom: 0; }

#top .list-inline-item > a,
#top .list-inline-item .dropdown > a {
  color: var(--text-secondary);
  line-height: 38px;
  font-size: 13px;
  font-weight: 500;
  padding: 0 2px;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#top .list-inline-item > a:hover,
#top .list-inline-item .dropdown > a:hover { color: var(--brand); }

#top .dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  margin-top: 4px;
  min-width: 160px;
}
#top .dropdown-item {
  border-radius: var(--radius-sm);
  font-size: 13px;
  padding: 7px 12px;
  color: var(--text-primary);
  transition: background var(--transition);
}
#top .dropdown-item:hover { background: var(--brand-light); color: var(--brand); }

/* ── Sticky Header ──────────────────────────────────────────── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}
header.scrolled { box-shadow: var(--shadow-sm); }

header .container { padding-top: 12px; padding-bottom: 12px; }

/* ── Logo ───────────────────────────────────────────────────── */
#logo { margin: 0; }
#logo a { display: inline-flex; align-items: center; }
#logo img { max-height: 48px; width: auto; }
#logo h1 { margin: 0; font-size: 22px; font-weight: 700; color: var(--brand); }
#logo h1 a { color: inherit; }

/* ── Search ─────────────────────────────────────────────────── */
#search { margin-bottom: 0; }
#search .input-group { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xs); }
#search .form-control {
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  height: 44px;
  font-size: 14px;
  padding: 0 14px;
  background: var(--surface-alt);
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition);
}
#search .form-control:focus {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  outline: none;
}
#search .form-control::placeholder { color: var(--text-muted); }
#search .btn {
  background: var(--brand);
  border: none;
  color: #fff;
  padding: 0 18px;
  height: 44px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 16px;
  transition: background var(--transition);
}
#search .btn:hover { background: var(--brand-dark); }

/* ── Cart ───────────────────────────────────────────────────── */
#cart { margin-bottom: 0; }
#cart > .dropdown > button,
#cart > .dropdown > a {
  background: var(--surface-alt) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  height: 44px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: space-between;
  padding: 0 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  text-shadow: none !important;
}
#cart > .dropdown > button:hover,
#cart > .dropdown > a:hover {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.10) !important;
}

#cart .dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  background: var(--surface) !important;
  min-width: 320px;
}
#cart .dropdown-menu li { min-width: auto; }
@media (max-width: 768px) { #cart .dropdown-menu { min-width: 100%; } }
#cart .img-thumbnail { border-radius: var(--radius-sm); border: 1px solid var(--border); min-width: 60px !important; }

/* ── Navigation Menu ────────────────────────────────────────── */
#menu-wrapper {
  background: var(--brand);
}

#menu {
  background: transparent;
  border: none;
  border-radius: 0;
  min-height: auto;
  padding: 0;
  margin-bottom: 0;
}

#menu .navbar-nav > li > a,
#menu .nav-item > .nav-link {
  color: rgba(255,255,255,.92);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 16px;
  letter-spacing: .01em;
  transition: background var(--transition), color var(--transition);
  border-radius: 0;
}
#menu .navbar-nav > li > a:hover,
#menu .nav-item > .nav-link:hover,
#menu .nav-item.show > .nav-link {
  background: rgba(255,255,255,.12);
  color: #fff;
}

#menu .dropdown-menu {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin-top: 0;
  animation: fadeDown .18s ease;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
#menu .dropdown-item {
  border-radius: var(--radius-sm);
  font-size: 14px;
  padding: 8px 14px;
  color: var(--text-primary);
  transition: background var(--transition);
}
#menu .dropdown-item:hover { background: var(--brand-light); color: var(--brand); }

#menu .dropdown-inner { display: flex; flex-direction: column; }
#menu .dropdown-inner ul { width: 100%; min-width: 200px; }

@media (min-width: 960px) {
  #menu .dropdown:hover .dropdown-menu { display: block; }
  #menu .dropdown-inner { flex-direction: row; }
  #menu .nav-item + .nav-item + .nav-item .dropdown-column-3 { left: -200px; }
  #menu .nav-item + .nav-item + .nav-item .dropdown-column-4 { left: -400px; }
  #menu .nav-item + .nav-item + .nav-item + .nav-item .dropdown-column-2 { left: -200px; }
  #menu .nav-item + .nav-item + .nav-item + .nav-item .dropdown-column-3 { left: -400px; }
  #menu .nav-item + .nav-item + .nav-item + .nav-item .dropdown-column-4 { left: -600px; }
}

#category {
  float: none;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: normal;
}
#menu .navbar-toggler {
  border: 1px solid rgba(255,255,255,.4);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
#menu .navbar-toggler i { color: #fff; font-size: .85em; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  background: transparent;
  border: none;
  padding: 4px 0 16px;
  margin-bottom: 0;
}
.breadcrumb-item { font-size: 13px; color: var(--text-muted); }
.breadcrumb-item a { color: var(--text-secondary); }
.breadcrumb-item a:hover { color: var(--brand); }
.breadcrumb-item.active { color: var(--text-primary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--border-strong); }

/* ── Product Card ───────────────────────────────────────────── */
.product-thumb {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  position: relative;
  height: 100%;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-thumb:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.product-thumb .image { text-align: center; background: var(--surface-alt); }
.product-thumb .image a { display: block; }
.product-thumb .image a:hover { opacity: .85; }
.product-thumb .image img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

.product-thumb .description {
  padding: 14px 16px 48px;
}
.product-thumb .description h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.product-thumb .button {
  display: flex;
  position: absolute;
  width: 100%;
  bottom: 0;
  border-top: 1px solid var(--border);
}
.product-thumb .button button {
  width: 33.33%;
  border: none;
  border-top: none;
  background: var(--surface-alt);
  color: var(--text-secondary);
  line-height: 42px;
  font-size: 14px;
  text-align: center;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.product-thumb .button button:hover {
  background: var(--brand-light);
  color: var(--brand);
}
.product-thumb .button button + button { border-left: 1px solid var(--border); }

@media (min-width: 960px) {
  .product-list .product-thumb { display: flex; border-radius: var(--radius-md); }
  .product-list .product-thumb .image { flex-shrink: 0; }
  .product-list .product-thumb .image img { border-radius: var(--radius-md) 0 0 var(--radius-md); }
  .product-list .product-thumb .content { flex: 1; position: relative; }
  .product-list .product-thumb .button {
    border-left: 1px solid var(--border);
    width: auto;
    flex-direction: column;
    position: relative;
  }
  .product-list .product-thumb .button button { width: 100%; border-left: none; }
  .product-list .product-thumb .button button + button { border-left: none; border-top: 1px solid var(--border); }
}

/* ── Price ──────────────────────────────────────────────────── */
.price { color: var(--text-primary); font-weight: 600; }
.price-new { font-weight: 700; color: var(--brand); font-size: 16px; }
.price-old { color: var(--text-muted); text-decoration: line-through; font-size: 13px; font-weight: 400; }
.price-tax { color: var(--text-muted); font-size: 11px; display: block; margin-top: 2px; }

/* ── Rating Stars ───────────────────────────────────────────── */
.rating .fa-stack { width: 18px; }
.rating .fa-star { color: #fbbf24; font-size: 13px; }
.rating .fa-star + .fa-star { color: #f59e0b; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  outline: none;
}
label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
div.required .col-form-label:before,
div.required .form-label:before { content: "* "; color: #ef4444; font-weight: 700; }
@media (min-width: 768px) { .col-form-label { text-align: right; } }

.form-switch-lg { font-size: 20px; min-height: 30px; line-height: 30px; }
.form-check .form-check-input { margin-top: .25rem; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn { border-radius: var(--radius-sm); font-weight: 500; font-size: 14px; transition: all var(--transition); }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline-primary { border-color: var(--brand); color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); }

/* ── Tabs ───────────────────────────────────────────────────── */
.nav-tabs { border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.nav-tabs .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 16px;
  transition: color var(--transition);
}
.nav-tabs .nav-link:hover { color: var(--brand); }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: none; }

/* ── Blog Card ──────────────────────────────────────────────── */
.blog-thumb {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
  background: var(--surface);
}
.blog-thumb:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.blog-thumb h4 { font-weight: 600; font-size: 15px; }
.blog-thumb .image { text-align: center; }
.blog-thumb .image a:hover { opacity: .85; }
.blog-thumb .description { padding: 16px; }

/* ── Cookie Banner ──────────────────────────────────────────── */
#cookie {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, calc(100% - 32px));
  border-radius: var(--radius-lg);
  z-index: 9999;
  background: #1e293b;
  color: #e2e8f0;
  padding: 18px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
}
#cookie div { font-size: 14px; color: #e2e8f0; flex: 1; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0 0;
  margin-top: 60px;
  border-top: none;
  position: relative;
  bottom: auto;
  width: 100%;
}
footer .footer-top { padding-bottom: 40px; }
footer .footer-brand { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 10px; display: block; }
footer .footer-tagline { font-size: 13px; color: #64748b; }

footer h5 {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
footer ul.list-unstyled li { margin-bottom: 10px; }
footer a {
  color: #94a3b8;
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition);
}
footer a:hover { color: #fff; }
footer hr { border: none; border-top: 1px solid #1e293b; margin: 0; }
footer .footer-bottom {
  padding: 20px 0;
  font-size: 13px;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination .page-link {
  border-color: var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  margin: 0 2px;
  font-size: 14px;
  transition: all var(--transition);
}
.pagination .page-link:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

/* ── Misc ───────────────────────────────────────────────────── */
legend { padding: 7px 0; margin-bottom: 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; }
button:focus { outline: none !important; }

#content, #column-left, #column-right { padding-bottom: 0; }

/* Scrollbar (Chrome/Edge) */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-alt); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
