:root {
  --font-base: 'Poppins', sans-serif;
  --primary-100: #e6ecf5;
  --primary-200: #cdd8eb;
  --primary-300: #9bb1d7;
  --primary-400: #6a8ac3;
  --primary-500: #3a63af;
  --primary-600: #2b4f95;
  --primary-700: #1e3c7b;
  --primary-800: #132a61;
  --primary-900: #091948;
  --primary-1000: #00193e;
  --secondary-100: #e6eef7;
  --secondary-200: #cddcef;
  --secondary-300: #9bb9df;
  --secondary-400: #6a96cf;
  --secondary-500: #3973bf;
  --secondary-600: #2d5ea4;
  --secondary-700: #214989;
  --secondary-800: #16356e;
  --secondary-900: #0b2153;
  --secondary-1000: #004388;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --bg: #f6f8fb;
  --text: #0f1a2b;
  --muted: #6c7a90;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;

  --surface: #ffffff;
  --surface-soft: var(--primary-100);
  --border: var(--primary-200);
  --focus: var(--secondary-500);
  --danger: var(--primary-800);
  --warn: var(--secondary-700);
  --success: var(--secondary-1000);
  --shadow-sm: 0 6px 18px rgba(9, 25, 72, 0.08);
  --shadow-md: 0 14px 40px rgba(9, 25, 72, 0.14);
}

* { box-sizing: border-box; }
body.of-b2b,
body.of-b2b * {
  font-family: var(--font-base) !important;
}
body.of-b2b {
  margin: 0;
  font-family: var(--font-base);
  color: var(--text);
  background: radial-gradient(1200px 700px at 8% -10%, var(--secondary-100), var(--bg) 60%, var(--surface) 100%);
}
a { color: inherit; text-decoration: none; }

.of-container {
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 48px);
  padding-right: clamp(16px, 3vw, 48px);
}
.of-main {
  min-height: calc(100vh - 130px);
  padding-top: var(--space-5);
  padding-bottom: var(--space-7);
}

.card, .of-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(16px, 2vw, 24px);
}

.btn, .of-btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  min-height: 44px;
  padding: 0 var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn:focus-visible, .of-btn:focus-visible,
input:focus-visible, textarea:focus-visible,
button:focus-visible, .of-filter-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.btn:disabled, .of-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary, .of-btn-primary {
  background: linear-gradient(140deg, var(--primary-700), var(--primary-1000));
  color: var(--surface);
  border-color: var(--primary-800);
}
.btn-primary:hover, .of-btn-primary:hover { filter: brightness(1.06); }
.btn-secondary, .of-btn-secondary {
  background: var(--secondary-100);
  color: var(--secondary-1000);
  border-color: var(--secondary-300);
}
.btn-secondary:hover, .of-btn-secondary:hover {
  background: var(--secondary-200);
}
.btn-ghost {
  background: transparent;
  color: var(--primary-900);
  border-color: var(--primary-200);
}
.btn-danger {
  background: var(--danger);
  border-color: var(--primary-900);
  color: var(--surface);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 var(--space-3);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-default { background: var(--primary-100); color: var(--primary-900); border-color: var(--primary-300); }
.badge-ceka-obradu { background: var(--secondary-200); color: var(--secondary-900); border-color: var(--secondary-400); }
.badge-slaze-se { background: var(--primary-200); color: var(--primary-900); border-color: var(--primary-400); }
.badge-utovareno { background: var(--secondary-100); color: var(--secondary-800); border-color: var(--secondary-300); }
.badge-isporuceno { background: var(--primary-100); color: var(--success); border-color: var(--secondary-400); }

.alert {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
  font-size: 0.95rem;
}
.alert-info { background: var(--secondary-100); color: var(--secondary-900); border-color: var(--secondary-300); }
.alert-success { background: var(--primary-100); color: var(--success); border-color: var(--secondary-400); }
.alert-warn { background: var(--secondary-200); color: var(--warn); border-color: var(--secondary-400); }
.alert-error { background: var(--primary-100); color: var(--danger); border-color: var(--primary-300); }

input[type="text"], input[type="search"], input[type="number"], textarea,
.of-global-search input, .of-search input, .of-home-search-bar input,
.of-qty-input, .of-qty-input-card {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
}

.of-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.of-header .of-container {
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.of-brand-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-1000);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 0;
}
.of-brand-logo {
  display: block;
  width: auto;
  max-width: clamp(150px, 20vw, 220px);
  height: auto;
}
.of-global-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  align-items: center;
}
.of-brand,
.of-nav {
  display: flex;
  align-items: center;
  height: 100%;
}
.of-nav {
  justify-content: flex-end;
}
.of-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-3);
}
.of-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--secondary-1000);
}
.of-menu a:hover { background: var(--secondary-100); }

.of-page-intro {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  background: linear-gradient(120deg, rgba(230, 238, 247, 0.85), rgba(255, 255, 255, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2vw, 30px);
}
.of-page-intro h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 2.3rem);
}
.of-page-hint {
  margin: var(--space-2) 0 0;
  color: var(--muted);
}
.of-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--primary-900);
}
.of-breadcrumbs a::after,
.of-breadcrumbs span[aria-current="false"]::after {
  content: "/";
  margin-left: var(--space-2);
}
.of-stepper {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.of-stepper li {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--muted);
  background: var(--surface);
}
.of-stepper li.is-done { background: var(--secondary-100); color: var(--secondary-900); border-color: var(--secondary-300); }
.of-stepper li.is-active { background: var(--primary-1000); color: var(--surface); border-color: var(--primary-900); }

.of-toolbar {
  margin-bottom: var(--space-4);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 1.4vw, 18px);
}
.of-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
}
.of-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.of-category-browser {
  margin-bottom: var(--space-4);
}
.of-category-browser-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.of-category-title {
  margin: 0;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
}
.of-category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.of-category-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.of-category-crumb {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--secondary-1000);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.of-category-sep {
  color: var(--muted);
}
.of-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}
.of-category-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-3);
  align-items: center;
  text-align: left;
  width: 100%;
  padding: var(--space-3);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.of-category-card:hover {
  border-color: var(--secondary-500);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.of-category-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.of-category-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.of-category-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-100));
}
.of-category-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.of-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 40px;
  border-radius: 999px;
  padding: 0 var(--space-2);
  border: 1px solid var(--secondary-300);
  background: var(--secondary-100);
  color: var(--secondary-900);
  font-weight: 600;
  font-size: 0.82rem;
}
.of-category-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  color: var(--muted);
  background: var(--surface-soft);
}

.of-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}
.of-filters {
  margin-bottom: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 1.5vw, 20px);
}
.of-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.of-filters-head h2 {
  margin: 0;
  font-size: 1.1rem;
}
.of-filters-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.of-filter-title {
  margin-bottom: var(--space-2);
  font-weight: 600;
  cursor: pointer;
}
.of-filter-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  background: var(--surface);
}
.of-filter-block summary {
  list-style: none;
}
.of-filter-block summary::-webkit-details-marker {
  display: none;
}
.of-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.of-filter-item {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  cursor: pointer;
}
.of-filter-item.active {
  background: var(--secondary-100);
  border-color: var(--secondary-400);
  color: var(--secondary-1000);
}
.of-filter-item.is-collapsed {
  display: none;
}
.of-filter-count {
  color: var(--muted);
  font-size: 0.84rem;
}
.of-filter-toggle-more {
  margin-top: var(--space-3);
  border: 0;
  background: transparent;
  color: var(--primary-700);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.of-filters-open,
.of-filters-close {
  display: none;
}
.of-filters-drawer {
  display: none;
}

.of-products {
  display: grid;
  gap: var(--space-4);
}
.of-active-filters {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}
.of-active-filters-label {
  color: var(--muted);
  font-size: 0.9rem;
}
.of-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  border-radius: 999px;
  background: var(--secondary-100);
  color: var(--secondary-900);
  border: 1px solid var(--secondary-300);
  padding: 0 var(--space-3);
}
.of-filter-chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
}
.of-filter-reset {
  margin-left: auto;
  color: var(--surface);
  background: var(--primary-700);
  border: 1px solid var(--primary-800);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
}
.of-products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
}
.of-products-count { font-weight: 600; }
.of-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
}
.of-product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.of-product-media {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--primary-100);
}
.of-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.of-product-title {
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.7em;
}
.of-product-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.of-product-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2);
  align-items: center;
}
.of-qty-control {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.of-qty-btn {
  width: 38px;
  min-height: 44px;
  border: 0;
  background: var(--surface-soft);
  color: var(--primary-900);
  cursor: pointer;
}
.of-qty-input-card {
  width: 62px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  min-height: 44px;
}

.of-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: var(--space-5);
  align-items: start;
}
.of-order-main,
.of-order-summary {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}
.of-order-summary {
  position: sticky;
  top: 110px;
  height: fit-content;
}
.of-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
}

.of-table {
  display: grid;
  gap: 0;
}
.of-table-header, .of-table-row {
  display: grid;
  align-items: center;
  gap: var(--space-3);
}
.of-table-header {
  grid-template-columns: 1.5fr 0.9fr 0.9fr 0.9fr 0.9fr 0.8fr;
  color: var(--muted);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  padding: 0 0 var(--space-3);
}
#of-order-items .of-table-row {
  grid-template-columns: minmax(0, 1.9fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) auto;
}
.of-table-orders .of-table-header,
.of-table-orders .of-table-row {
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1.3fr;
}
.of-table-confirmation .of-table-header,
.of-table-confirmation .of-table-row {
  grid-template-columns: 1.8fr 0.8fr 0.9fr 0.9fr 0.9fr;
}
.of-table-order-details .of-table-header,
.of-table-order-details .of-table-row {
  grid-template-columns: 0.7fr 1.8fr 0.9fr 1fr 1fr 1fr;
}
.of-table-row {
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
}
.of-table-row:hover { background: var(--primary-100); }
.of-table-actions { display: flex; }
.of-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.of-table-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  font-size: 1.05rem;
  font-weight: 700;
}

.of-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.of-order-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.of-order-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.of-order-meta-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: var(--space-3);
}
.of-line-product {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.of-line-product span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.of-line-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.of-product-single {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--space-4);
}
.of-product-single-media,
.of-product-single-info,
.of-product-single-cta {
  display: grid;
  gap: var(--space-3);
}
.of-product-single-cta {
  grid-column: 1 / -1;
}
.of-product-main-image-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-soft);
}
.of-product-main-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: contain;
}
.of-product-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.of-product-thumb {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 0;
  width: 72px;
  height: 72px;
  overflow: hidden;
  cursor: pointer;
}
.of-product-thumb.is-active {
  border-color: var(--secondary-500);
}
.of-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.of-meta-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.of-product-description h2 {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
}

.of-home {
  display: grid;
  gap: var(--space-5);
}
.of-home-quick { padding: clamp(16px, 2vw, 22px); }
.of-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.of-quick-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-2);
}
.of-quick-tile span {
  color: var(--muted);
  font-size: 0.9rem;
}
.of-home-search {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(16px, 2vw, 24px);
  display: grid;
  gap: var(--space-3);
}
.of-home-search h2 { margin: 0; }
.of-home-search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
}
.of-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.of-home-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
}
.of-category-card {
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: grid;
  align-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
}
.of-category-icon { width: 34px; height: 34px; color: var(--primary-700); }
.of-active-order {
  background: var(--secondary-100);
  border: 1px solid var(--secondary-300);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
}
.of-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.of-summary-label { font-size: 0.8rem; color: var(--muted); }
.of-summary-value { font-weight: 600; }

.of-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: rgba(9, 25, 72, 0.6);
  z-index: 100;
}
.of-modal.open { display: flex; }
.of-modal-content {
  width: min(760px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
}
.of-modal-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.of-modal-body {
  display: grid;
  gap: var(--space-3);
}
.of-scan-search-cta {
  justify-self: flex-start;
}
#of-scan-video {
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--primary-1000);
  min-height: 220px;
}

.of-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.2s ease;
  background: var(--primary-1000);
  color: var(--surface);
  border: 1px solid var(--primary-800);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-md);
}
.of-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.of-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.of-pagination button {
  min-height: 40px;
  min-width: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.of-pagination button.active {
  background: var(--secondary-100);
  border-color: var(--secondary-400);
}

.of-muted { color: var(--muted); }
.of-price { font-weight: 700; color: var(--primary-1000); }
.of-footer {
  margin-top: var(--space-7);
  color: rgba(255, 255, 255, 0.76);
  background: linear-gradient(135deg, var(--primary-900), var(--primary-1000));
  border-top: 0;
}
.of-footer .of-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
}
.of-footer-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.of-footer-logo {
  display: block;
  width: auto;
  max-width: clamp(150px, 20vw, 220px);
  height: auto;
}
.of-footer-meta {
  text-align: right;
}

.of-order-summary-head h2 {
  margin: 0;
  color: var(--secondary-1000);
}

.of-delivery-methods {
  margin: 0;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(230, 238, 247, 0.75), rgba(255, 255, 255, 0.96));
}
.of-delivery-methods.is-disabled {
  opacity: 0.68;
}
.of-delivery-title {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-800), var(--secondary-1000));
  color: var(--surface);
  font-size: 1rem;
  font-weight: 700;
}
.of-delivery-methods.is-invalid {
  border-color: #c23a4b;
  box-shadow: inset 0 0 0 1px rgba(194, 58, 75, 0.2);
}
.of-delivery-options {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.of-delivery-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid transparent;
  cursor: pointer;
}
.of-delivery-option span {
  display: block;
  width: 100%;
}
.of-delivery-option input:checked + span {
  color: var(--secondary-1000);
  font-weight: 600;
}
.of-delivery-option input:checked + span::before {
  content: "";
}
.of-delivery-option input:checked {
  accent-color: var(--secondary-700);
}
.of-delivery-option.is-selected,
.of-delivery-option:focus-within {
  border-color: var(--secondary-500);
  background: var(--surface);
}
.of-delivery-option input {
  margin-top: 2px;
}
.of-delivery-hint {
  margin: 0;
  line-height: 1.5;
}

.of-loading-skeleton {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 220px;
  background:
    linear-gradient(90deg, var(--primary-100) 25%, var(--secondary-100) 50%, var(--primary-100) 75%);
  background-size: 200% 100%;
  animation: of-shimmer 1.2s linear infinite;
}
@keyframes of-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

body.of-b2b.of-login-body {
  background: #e8edf3;
}
.of-login-page {
  min-height: 100vh;
}
.of-login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--surface);
}
.of-login-visual {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(32px, 5vw, 72px);
  background-color: #d8dde4;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}
.of-login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(9, 25, 72, 0.18) 38%, rgba(9, 25, 72, 0.78) 100%);
}
.of-login-visual-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  color: #ffffff;
}
.of-login-kicker,
.of-login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.of-login-kicker {
  color: rgba(255, 255, 255, 0.84);
}
.of-login-visual h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2rem, 4.4vw, 4.5rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}
.of-login-visual p {
  margin: 18px 0 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
  line-height: 1.7;
}
.of-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 76px);
  background: #ffffff;
}
.of-login-card {
  width: min(100%, 460px);
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
.of-login-brand {
  margin-bottom: 28px;
}
.of-login-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 220px;
}
.of-login-copy {
  margin-bottom: 24px;
}
.of-login-eyebrow {
  color: var(--secondary-1000);
}
.of-login-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #091948;
}
.of-login-copy p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}
.of-login-alert {
  margin-bottom: 18px;
}
.of-login-form {
  display: grid;
  gap: 18px;
}
.of-login-field {
  display: grid;
  gap: 8px;
}
.of-login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.of-login-field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #14213d;
}
.of-login-label-row a {
  color: var(--secondary-1000);
  font-size: 0.92rem;
  font-weight: 600;
}
.of-login-field input[type="text"],
.of-login-field input[type="password"] {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #d6ddea;
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.of-login-field input[type="text"]:hover,
.of-login-field input[type="password"]:hover {
  border-color: #b8c5d9;
}
.of-login-field input[type="text"]:focus,
.of-login-field input[type="password"]:focus {
  border-color: var(--secondary-500);
  box-shadow: 0 0 0 4px rgba(57, 115, 191, 0.12);
  outline: none;
}
.of-login-remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.of-login-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--secondary-700);
}
.of-login-submit {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
}

@media (max-width: 1180px) {
  .of-header .of-container {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .of-menu { justify-content: flex-start; }
  .of-order-layout { grid-template-columns: 1fr; }
  .of-order-summary { position: static; }
  .of-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .of-footer .of-container {
    align-items: flex-start;
    flex-direction: column;
  }
  .of-footer-meta {
    text-align: left;
  }
  .of-login-shell {
    grid-template-columns: 1fr;
  }
  .of-login-visual {
    min-height: 44vh;
    align-items: flex-end;
  }
}

@media (max-width: 900px) {
  .of-filter-grid { grid-template-columns: 1fr; }
  .of-toolbar,
  .of-search,
  .of-home-search-bar {
    grid-template-columns: 1fr;
  }
  .of-stepper { grid-template-columns: 1fr; }
  .of-category-browser-top {
    flex-direction: column;
  }
  .of-category-grid {
    grid-template-columns: 1fr;
  }
  .of-filters-open,
  .of-filters-close {
    display: inline-flex;
  }
  .of-login-visual h1 {
    max-width: 11ch;
  }
  .of-login-label-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .of-filters {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(92vw, 420px);
    z-index: 90;
    transform: translateX(102%);
    transition: transform 0.2s ease;
    overflow: auto;
    margin: 0;
    border-radius: 0;
  }
  .of-filters.is-open {
    transform: translateX(0);
  }
  .of-filters-drawer {
    position: fixed;
    inset: 0;
    z-index: 89;
    background: rgba(9, 25, 72, 0.46);
  }
  .of-filters-drawer.is-open {
    display: block;
  }
  .of-lock-scroll {
    overflow: hidden;
  }

  .of-table-header { display: none; }
  .of-table-row,
  #of-order-items .of-table-row,
  .of-table-orders .of-table-row {
    grid-template-columns: 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin-bottom: var(--space-2);
  }
  .of-table-row > div {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
  }
  .of-table-row > div::before {
    color: var(--muted);
    font-size: 0.84rem;
  }

  #of-order-items .of-table-row > div:nth-child(1)::before { content: "Naziv"; }
  #of-order-items .of-table-row > div:nth-child(2)::before { content: "Kolicina"; }
  #of-order-items .of-table-row > div:nth-child(3)::before { content: "Jedinica"; }
  #of-order-items .of-table-row > div:nth-child(4)::before { content: "Cijena"; }
  #of-order-items .of-table-row > div:nth-child(5)::before { content: "Ukupno"; }
  #of-order-items .of-table-row > div:nth-child(6)::before { content: "Akcija"; }

  #of-orders-list .of-table-row > div:nth-child(1)::before { content: "Narudzba"; }
  #of-orders-list .of-table-row > div:nth-child(2)::before { content: "Datum"; }
  #of-orders-list .of-table-row > div:nth-child(3)::before { content: "Status"; }
  #of-orders-list .of-table-row > div:nth-child(4)::before { content: "Ukupno"; }
  #of-orders-list .of-table-row > div:nth-child(5)::before { content: "Akcija"; }

  #of-order-details .of-table-row > div:nth-child(1)::before { content: "Odabir"; }
  #of-order-details .of-table-row > div:nth-child(2)::before { content: "Artikl"; }
  #of-order-details .of-table-row > div:nth-child(3)::before { content: "Kolicina"; }
  #of-order-details .of-table-row > div:nth-child(4)::before { content: "Jedinica"; }
  #of-order-details .of-table-row > div:nth-child(5)::before { content: "Cijena"; }
  #of-order-details .of-table-row > div:nth-child(6)::before { content: "Ukupno"; }
}

@media (max-width: 760px) {
  .of-quick-grid { grid-template-columns: 1fr; }
  .of-product-actions { grid-template-columns: 1fr; }
  .of-product-single {
    grid-template-columns: 1fr;
  }
  .of-filter-reset {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .of-login-panel,
  .of-login-visual {
    padding: 24px;
  }
  .of-login-visual {
    min-height: 38vh;
    background-position: 58% center;
  }
  .of-login-copy h2 {
    font-size: 1.8rem;
  }
}
