/* ==========================================================================
   B2B Auto Oprema - Light Professional Theme
   ========================================================================== */

:root {
  --bg-primary: #f5f7fa;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --color-primary: #b8860b;
  --color-primary-hover: #96700a;
  --color-primary-light: rgba(184, 134, 11, 0.08);
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --color-info: #2563eb;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.15s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
hr { border: none; border-top: 1px solid var(--border-color); margin: 1rem 0; }
small { font-size: 0.85em; color: var(--text-secondary); }
strong { font-weight: 600; }
code { background: #f1f5f9; padding: 2px 6px; border-radius: var(--radius-sm); font-size: 0.875em; }

/* Typography */
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.35; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.1rem; font-weight: 600; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--color-success) !important; }
.text-error { color: var(--color-error) !important; }
.text-warning { color: var(--color-warning) !important; }

/* Container / Grid */
.container { max-width: 1600px; margin: 0 auto; padding: 0 1.5rem; }
.page-heading { margin-bottom: 1.5rem; }

/* App layout */
.app-container { min-height: calc(100vh - 130px); }
.main-content { padding: 2rem 0; }

/* ===== HEADER ===== */
.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 100;
  padding: 0.5rem 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  height: 80px;
}
.site-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; flex-shrink: 0;
}
.logo-text {
  font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary);
}
.header-search { flex: 1; max-width: 480px; margin: 0 auto; }
.search-form { display: flex; gap: 0; }
.search-input {
  flex: 1; padding: 0.5rem 0.875rem;
  border: 1px solid var(--input-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--input-bg);
  font-size: 0.875rem; color: var(--text-primary);
  outline: none; transition: border var(--transition);
}
.search-input:focus { border-color: var(--color-primary); }
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 0.5rem 1rem;
  background: var(--color-primary); color: #fff;
  border: 1px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: background var(--transition);
}

/* Live search dropdown */
.live-search-results {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg); z-index: 999; max-height: 420px; overflow-y: auto;
}
.ls-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem;
  text-decoration: none; color: var(--text-primary); border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.ls-item:hover { background: var(--color-primary-light); }
.ls-img { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ls-img img { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; }
.ls-no-img { font-size: 1.5rem; color: var(--text-muted); }
.ls-info { display: flex; flex-direction: column; min-width: 0; }
.ls-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-sku { font-size: 0.75rem; color: var(--text-muted); }
.ls-all {
  display: block; text-align: center; padding: 0.625rem; font-size: 0.85rem;
  color: var(--color-primary); text-decoration: none; font-weight: 500;
}
.ls-all:hover { background: var(--color-primary-light); }
.ls-empty { padding: 1rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.search-btn:hover { background: var(--color-primary-hover); }
.header-actions { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.cart-link {
  position: relative; display: flex; align-items: center;
  font-size: 1.4rem; color: var(--text-primary); padding: 0.25rem;
}
.cart-count {
  position: absolute; top: -4px; right: -8px;
  background: var(--color-error); color: #fff;
  font-size: 0.7rem; font-weight: 600;
  min-width: 18px; height: 18px; line-height: 18px;
  text-align: center; border-radius: 9px;
}
.user-menu { position: relative; }
.user-menu-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  background: none; border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 0.375rem 0.75rem;
  cursor: pointer; font-size: 0.875rem; color: var(--text-primary);
  transition: all var(--transition);
}
.user-menu-toggle:hover { border-color: var(--color-primary); }
.user-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
  min-width: 200px; background: #fff;
  border: 1px solid var(--border-color); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 200;
  padding: 0.25rem 0; display: none;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a {
  display: block; padding: 0.5rem 1rem;
  color: var(--text-secondary); font-size: 0.875rem;
  transition: all var(--transition);
}
.user-dropdown a:hover { background: var(--bg-primary); color: var(--text-primary); }

/* ===== NAV ===== */
.main-nav {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
}
.nav-list { display: flex; align-items: center; gap: 0; }
.nav-link {
  display: block; padding: 0.75rem 1rem;
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  transition: color var(--transition);
  border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.nav-item { position: relative; list-style: none; }
.nav-icon { margin-right: 0.25rem; }
.has-dropdown > .nav-link::after {
  content: ' \25BE'; font-size: 0.7em; margin-left: 0.25rem;
}
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--bg-card, #fff); border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 6px); box-shadow: var(--shadow-md);
  min-width: 180px; padding: 0.25rem 0; z-index: 100;
  list-style: none; margin: 0;
}
.has-dropdown:hover .nav-dropdown { display: block; }
.nav-dropdown-link {
  display: block; padding: 0.5rem 1rem;
  color: var(--text-secondary); font-size: 0.85rem;
  text-decoration: none; transition: background var(--transition), color var(--transition);
}
.nav-dropdown-link:hover {
  background: var(--bg-primary, #f5f5f5); color: var(--color-primary);
}

/* ===== AUTH PAGES ===== */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 130px); padding: 2rem 1rem;
}
.auth-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 2.5rem;
  width: 100%; max-width: 420px;
}
.auth-card-wide { max-width: 640px; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-header p { color: var(--text-secondary); font-size: 0.9rem; }
.auth-form { display: flex; flex-direction: column; gap: 0; }
.auth-links {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color);
}
.auth-links a { font-size: 0.875rem; color: var(--color-primary); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; margin-bottom: 0.375rem;
  font-size: 0.875rem; font-weight: 500; color: var(--text-primary);
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.5rem 0.75rem;
  background: var(--input-bg); color: var(--text-primary);
  border: 1px solid var(--input-border); border-radius: var(--radius);
  font-size: 0.875rem; font-family: var(--font);
  outline: none; transition: border var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }
.form-select-sm { padding: 0.35rem 0.5rem; font-size: 0.8rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-section-title {
  font-size: 1rem; font-weight: 600;
  margin: 1.5rem 0 1rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.checkbox-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; cursor: pointer; padding: 0.25rem 0;
}
.checkbox-inline { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }

/* ===== FLASH MESSAGES ===== */
.flash-container {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.625rem;
  max-width: 420px; pointer-events: none;
}
.flash-message {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.875rem 1.25rem; border-radius: 12px;
  font-size: 0.875rem; font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  animation: flashIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1);
  pointer-events: auto; backdrop-filter: blur(8px);
}
.flash-out { animation: flashOut 0.3s ease forwards; }
@keyframes flashIn { from { opacity: 0; transform: translateX(40px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes flashOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
.flash-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
}
.flash-success { background: rgba(240,253,244,0.95); color: #166534; border: 1px solid #bbf7d0; }
.flash-success .flash-icon { background: #22c55e; color: #fff; }
.flash-error { background: rgba(254,242,242,0.95); color: #991b1b; border: 1px solid #fecaca; }
.flash-error .flash-icon { background: #ef4444; color: #fff; }
.flash-warning { background: rgba(255,251,235,0.95); color: #92400e; border: 1px solid #fde68a; }
.flash-warning .flash-icon { background: #f59e0b; color: #fff; }
.flash-info { background: rgba(239,246,255,0.95); color: #1e40af; border: 1px solid #bfdbfe; }
.flash-info .flash-icon { background: #3b82f6; color: #fff; }
.flash-text { flex: 1; line-height: 1.4; }
.flash-close {
  background: none; border: none; font-size: 1.25rem;
  cursor: pointer; opacity: 0.4; padding: 0; margin-left: 0.5rem;
  color: inherit; line-height: 1; transition: opacity 0.15s;
}
.flash-close:hover { opacity: 1; }

/* ===== ERROR PAGE ===== */
.error-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; text-align: center;
}
.error-code { font-size: 6rem; font-weight: 800; color: var(--border-color); line-height: 1; }
.error-message { font-size: 1.1rem; color: var(--text-secondary); margin: 1rem 0 2rem; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-header); border-top: 1px solid var(--border-color);
  padding: 1.5rem 0; text-align: center;
  font-size: 0.85rem; color: var(--text-secondary);
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}
/* Na naslovnici (nema sidebara) stane više artikala */
.homepage-grid {
  grid-template-columns: repeat(6, 1fr);
}
.product-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden; transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card-link { flex: 1; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.product-card-image {
  aspect-ratio: 4/3; overflow: hidden; background: #f8fafc;
  display: flex; align-items: center; justify-content: center;
  padding: 0.5rem;
}
.product-card-image img { width: 100%; height: 100%; object-fit: contain; }
.product-no-image {
  color: var(--text-muted); font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; background: #f8fafc;
}
.product-no-image.large { min-height: 300px; }
.product-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product-card-title {
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
  margin-bottom: 0.25rem; line-height: 1.3; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.product-card-sku { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.375rem; }
.product-card-brand { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.product-card-price { margin-top: 0.5rem; }
.price-row-original { display: flex; align-items: center; gap: 0.375rem; flex-wrap: nowrap; }
.price-row-current { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-top: 0.125rem; }
.price-row-vat { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.125rem; }
.price-original {
  font-size: 0.8rem; color: var(--text-muted);
  text-decoration: line-through; white-space: nowrap;
}
.price-current { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.price-current-large { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.price-discount {
  display: inline-block; background: #fef2f2; color: var(--color-error);
  font-size: 0.75rem; font-weight: 600; padding: 2px 6px;
  border-radius: var(--radius-sm); white-space: nowrap;
}
.price-vat { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.125rem; }
.price-vat-info { font-size: 0.85rem; color: var(--text-secondary); }
.price-total { font-size: 1.1rem; font-weight: 600; margin-top: 0.25rem; }
.price-discount-label { color: var(--color-success); font-size: 0.9rem; }

/* Stock status */
.product-card-stock {
  display: inline-block; font-size: 0.75rem; font-weight: 500;
  padding: 2px 8px; border-radius: var(--radius-sm); margin-top: auto; padding-top: 0.5rem;
}
.stock-in_stock { background: #f0fdf4; color: #166534; }
.stock-low_stock { background: #fffbeb; color: #92400e; }
.stock-out_of_stock { background: #fef2f2; color: #991b1b; }
.stock-on_order { background: #eff6ff; color: #1e40af; }

/* Product card actions */
.product-card-actions {
  padding: 0.5rem 0.75rem; border-top: 1px solid var(--border-color);
  display: flex; align-items: center; gap: 0.375rem;
}

/* Quantity input */
.quantity-input {
  display: inline-flex; align-items: center;
  border: 1px solid var(--input-border); border-radius: var(--radius);
  overflow: hidden;
}
.quantity-input-sm { font-size: 0.85rem; }
.qty-value {
  width: 40px; height: 32px; text-align: center; border: none;
  font-size: 0.875rem; color: var(--text-primary); background: #fff;
  outline: none; border-right: 1px solid var(--border-color);
}
.qty-spinners {
  display: flex; flex-direction: column; height: 32px;
}
.qty-spin {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 16px; background: #f1f5f9; border: none;
  cursor: pointer; font-size: 0; line-height: 1; padding: 0;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-color);
}
.qty-spin:last-child { border-bottom: none; }
.qty-spin:hover { background: #e2e8f0; }
.qty-spin::after {
  content: ''; display: block; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
}
.qty-spin-up::after { border-bottom: 5px solid var(--text-primary); }
.qty-spin-down::after { border-top: 5px solid var(--text-primary); }
.qty-value::-webkit-inner-spin-button,
.qty-value::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-value { -moz-appearance: textfield; }

/* ===== PRODUCTS PAGE LAYOUT ===== */
.products-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; }
.products-sidebar {
  display: flex; flex-direction: column; gap: 1rem;
  max-height: calc(100vh - 120px); overflow-y: auto; position: sticky; top: 80px;
  padding-right: 0.25rem;
}
.products-sidebar::-webkit-scrollbar { width: 4px; }
.products-sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.products-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.products-count { font-size: 0.9rem; color: var(--text-secondary); }
.products-sort { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.products-sort label { color: var(--text-secondary); }

/* Sidebar filter sekcije */
.products-sidebar .sidebar-filter {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: auto;
}
.products-sidebar .sidebar-filter .filter-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* Category tree / filter */
.category-tree a, .filter-list a {
  display: block; padding: 0.25rem 0.5rem; font-size: 0.8rem;
  color: var(--text-secondary); border-radius: var(--radius-sm);
  transition: all var(--transition); line-height: 1.4;
  word-break: break-word;
}
.category-tree a:hover, .filter-list a:hover { background: var(--color-primary-light); color: var(--color-primary); }
.category-tree a.active, .filter-list a.active { background: var(--color-primary-light); color: var(--color-primary); font-weight: 500; }
.category-tree ul { margin-left: 0.75rem; font-size: 0.95em; }
.category-tree > li > a { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
.category-tree ul ul { margin-left: 0.5rem; font-size: 0.95em; }
.category-tree ul ul ul { margin-left: 0.5rem; }
.cat-toggle {
  display: inline-block; width: 14px; font-size: 0.6rem; color: var(--text-muted);
  cursor: pointer; text-align: center; vertical-align: middle; user-select: none;
  margin-right: 2px;
}
.cat-toggle:hover { color: var(--color-primary); }
.category-tree li { display: flex; flex-wrap: wrap; align-items: baseline; }
.category-tree li > a { flex: 1; }
.category-tree li > .cat-children { width: 100%; }

/* Subcategory bar - iznad artikala */
.subcategory-bar { margin-bottom: 1.5rem; }
.subcategory-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.subcategory-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem;
}
.subcategory-card {
  display: flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.75rem; background: #fff;
  border: 1px solid var(--border-color); border-radius: var(--radius);
  text-decoration: none; color: var(--text-primary);
  font-size: 0.8rem; font-weight: 500; text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 42px;
}
.subcategory-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); }
.subcategory-card span { line-height: 1.2; word-break: break-word; }
@media (max-width: 1200px) { .subcategory-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1024px) { .subcategory-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) { .subcategory-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .subcategory-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== PRODUCT DETAIL ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-bottom: 2rem; }
.gallery-main { background: #f8fafc; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.gallery-thumb {
  width: 64px; height: 64px; object-fit: cover; cursor: pointer;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  opacity: 0.6; transition: all var(--transition);
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--color-primary); opacity: 1; }
.product-title { font-size: 1.5rem; margin-bottom: 0.75rem; }
.product-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--text-secondary);
}
.product-pricing {
  background: #f8fafc; border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1.5rem;
}
.product-pricing p { margin-bottom: 0.25rem; }
.product-add-cart { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }

/* Tabs */
.tabs {
  display: flex; border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.5rem; gap: 0;
}
.tab-item {
  padding: 0.75rem 1.25rem; background: none; border: none;
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all var(--transition);
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.prose { line-height: 1.7; color: var(--text-primary); }
.oem-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ===== CART ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; }
.cart-product { display: flex; align-items: center; gap: 0.75rem; }
.cart-product-img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-product-name { font-weight: 500; color: var(--text-primary); font-size: 0.875rem; }
.cart-product-sku { font-size: 0.75rem; color: var(--text-muted); display: block; }
.line-total { white-space: nowrap; }
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; font-size: 0.9rem;
}
.summary-total {
  border-top: 2px solid var(--text-primary);
  margin-top: 0.5rem; padding-top: 0.75rem; font-size: 1.1rem;
}

/* ===== CHECKOUT ===== */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 2rem; }
.checkout-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; font-size: 0.875rem;
}
.checkout-item-name { flex: 1; }
.checkout-item-price { font-weight: 600; margin-left: 1rem; }

/* ===== ORDERS ===== */
.order-detail-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.order-detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; }
.status-timeline { display: flex; flex-direction: column; gap: 0.75rem; }
.timeline-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; }
.timeline-date { color: var(--text-muted); min-width: 130px; }
.timeline-note { color: var(--text-secondary); }

/* ===== PROFILE ===== */
.profile-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; }

/* ===== HAMBURGER MENU BUTTON ===== */
.mobile-menu-toggle {
  display: none; /* Skriven na desktopu */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.hamburger-icon { top: 50%; margin-top: -1px; }
.hamburger-icon::before { content: ''; top: -6px; left: 0; transform: none; }
.hamburger-icon::after { content: ''; top: 6px; left: 0; transform: none; }
/* Animacija X kad je otvoren */
.mobile-menu-toggle.active .hamburger-icon { background: transparent; }
.mobile-menu-toggle.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}
.mobile-menu-toggle.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ===== MOBILE NAV (vertical dropdown) ===== */
.mobile-nav.open {
  display: block;
}

/* ===== SIDEBAR TOGGLE ZA MOBILNI ===== */
.sidebar-toggle {
  display: none;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  margin-bottom: 1rem;
}
.sidebar-toggle::after {
  content: ' \25BC';
  float: right;
  font-size: 0.7em;
  color: var(--text-muted);
}

/* Body overlay za mobilni meni */
body.menu-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 90;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .homepage-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .homepage-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
  .homepage-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .products-layout { grid-template-columns: 220px 1fr; }
  .cart-layout, .checkout-layout, .order-detail-layout, .profile-layout { grid-template-columns: 1fr; }
}

/* === TABLET I MOBILNI (<768px) === */
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .products-layout { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 1.5rem; }

  /* Header: stack vertikalno */
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
  }
  .header-search {
    order: 3;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .header-actions { gap: 0.5rem; }

  /* Hamburger vidljiv */
  .mobile-menu-toggle { display: flex; }

  /* Nav: skriven, vertikalni dropdown */
  .main-nav {
    display: none;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 95;
  }
  .main-nav.open { display: block; }
  .nav-list {
    flex-direction: column;
    overflow-x: visible;
  }
  .nav-link {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-item.has-dropdown > .nav-link::after { float: right; }
  .nav-dropdown {
    position: static;
    border: none;
    border-radius: 0;
    box-shadow: none;
    min-width: auto;
    padding: 0;
    display: none;
    background: var(--bg-primary);
  }
  .has-dropdown:hover .nav-dropdown,
  .has-dropdown.open .nav-dropdown { display: block; }
  .nav-dropdown-link { padding: 0.75rem 1rem 0.75rem 2rem; }

  /* Sidebar: sklopiva na mobilnom */
  .products-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    display: none;
  }
  .products-sidebar.open { display: flex; }
  .sidebar-toggle { display: block; }

  /* Live search: puni širina */
  .live-search-results { left: -1rem; right: -1rem; }

  /* Product card actions: wrap */
  .product-card-actions { flex-wrap: wrap; }

  /* User ime skrati */
  .user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* PWA install gumb manji */
  .pwa-install-btn { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
}

/* === MALI MOBILNI (<576px) === */
@media (max-width: 576px) {
  .product-grid { grid-template-columns: 1fr; gap: 1rem; }
  .homepage-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { gap: 0.5rem; }
  .container { padding: 0 1rem; }
  .logo-text { font-size: 1rem; }

  /* Quantity input: kompaktnije */
  .qty-value { width: 36px; }

  /* Flash poruke: pune širine */
  .flash-container { left: 1rem; right: 1rem; max-width: none; }

  /* Tabs: skrolaj */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab-item { flex-shrink: 0; padding: 0.625rem 0.875rem; font-size: 0.8rem; }
}

/* === VRLO MALI EKRANI (<400px) === */
@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr; }
  .homepage-grid { grid-template-columns: 1fr; }
  .header-actions { gap: 0.25rem; }
  .user-menu-toggle { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
  .user-name { max-width: 60px; }
  .search-btn { padding: 0.5rem 0.625rem; font-size: 0.8rem; }
}
