/* ============================================================
   SB Catalog – Stiluri Principale
   ============================================================ */

/* ─── Reset & bază ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:      #f5f5f3;
  --clr-white:   #ffffff;
  --clr-dark:    #1a1a1a;
  --clr-mid:     #555555;
  --clr-light:   #e8e8e4;
  --clr-accent:  #2a2a2a;
  --clr-btn:     #1a1a1a;
  --clr-btn-h:   #333333;
  --radius:      6px;
  --shadow:      0 2px 12px rgba(0,0,0,.10);
  --shadow-h:    0 4px 20px rgba(0,0,0,.18);
  --font:        'Inter', 'Helvetica Neue', Arial, sans-serif;
  --transition:  .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-dark);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header / Nav ───────────────────────────────────────────── */
.sb-header {
  background: var(--clr-dark);
  color: var(--clr-white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.sb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.sb-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--clr-white);
  text-decoration: none;
}

/* logo-line1 și logo-line2 gestionate mai jos */

.sb-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sb-nav a {
  color: rgba(255,255,255,.75);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}

.sb-nav a:hover,
.sb-nav a.active {
  background: rgba(255,255,255,.12);
  color: var(--clr-white);
}

.sb-nav-mobile { display: none; }

/* ─── Hero / Home ────────────────────────────────────────────── */
.sb-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: var(--clr-white);
  padding: 72px 0 64px;
  text-align: center;
}

.sb-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}

.sb-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.7);
  max-width: 560px;
  margin: 0 auto 40px;
}

.sb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.sb-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--clr-white);
}

.sb-card:hover {
  background: rgba(255,255,255,.14);
  transform: translateY(-3px);
  box-shadow: var(--shadow-h);
}

.sb-card-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.sb-card h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.sb-card p {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  text-align: center;
  margin: 0;
}

/* ─── Pagina catalog – antet ─────────────────────────────────── */
.sb-page-header {
  background: var(--clr-white);
  border-bottom: 1px solid var(--clr-light);
  padding: 28px 0;
}

.sb-page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.sb-page-header p {
  color: var(--clr-mid);
  margin-top: 4px;
  font-size: .9rem;
}

/* ─── Bare filtre UV ─────────────────────────────────────────── */
.sb-toolbar {
  background: var(--clr-white);
  border-bottom: 1px solid var(--clr-light);
  padding: 14px 0;
  position: sticky;
  top: 60px;
  z-index: 90;
}

.sb-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.sb-search-wrap {
  flex: 1;
  min-width: 180px;
  max-width: 300px;
  position: relative;
}

.sb-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

.sb-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--clr-light);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--clr-bg);
}

.sb-search-input:focus {
  border-color: var(--clr-dark);
  background: var(--clr-white);
}

/* dropdown filtre */
.sb-filter-wrap {
  position: relative;
}

.sb-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--clr-light);
  border-radius: var(--radius);
  background: var(--clr-bg);
  font-size: 14px;
  white-space: nowrap;
  transition: var(--transition);
  color: var(--clr-dark);
}

.sb-filter-btn:hover, .sb-filter-btn.open {
  border-color: var(--clr-dark);
  background: var(--clr-white);
}

.sb-filter-btn .arrow { transition: transform .2s; font-size: 10px; }
.sb-filter-btn.open .arrow { transform: rotate(180deg); }

.sb-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--clr-white);
  border: 1px solid var(--clr-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-h);
  min-width: 200px;
  max-height: 420px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}

.sb-dropdown.open { display: block; }

.sb-dropdown-section { padding: 6px 0; }

.sb-dropdown-title {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
  letter-spacing: .5px;
}

.sb-dropdown-item {
  display: block;
  padding: 7px 14px 7px 22px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-dropdown-item:hover,
.sb-dropdown-item.selected { background: var(--clr-bg); font-weight: 600; }

/* culori dropdown */
.sb-color-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background var(--transition);
}

.sb-color-item:hover,
.sb-color-item.selected { background: var(--clr-bg); }

.sb-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  flex-shrink: 0;
}

/* buton resetare */
.sb-btn-clear {
  padding: 8px 14px;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius);
  background: var(--clr-white);
  font-size: 13px;
  color: #e53e3e;
  transition: var(--transition);
  display: none;
}

.sb-btn-clear:hover { background: #fff0f0; border-color: #e53e3e; }
.sb-btn-clear.visible { display: inline-flex; align-items: center; gap: 5px; }

/* ─── Gallery grid ───────────────────────────────────────────── */
.sb-gallery-wrap { padding: 28px 0 48px; }

.sb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.sb-img-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--clr-white);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  aspect-ratio: 1;
}

.sb-img-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-h);
}

.sb-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .3s;
}

.sb-img-item .sb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: flex-end;
  padding: 10px;
  transition: background var(--transition);
}

.sb-img-item:hover .sb-overlay { background: rgba(0,0,0,.35); }

.sb-img-nr {
  color: var(--clr-white);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition);
  background: rgba(0,0,0,.5);
  padding: 2px 8px;
  border-radius: 4px;
}

.sb-img-item:hover .sb-img-nr { opacity: 1; }

/* ─── Paginare ───────────────────────────────────────────────── */
.sb-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 24px 0 8px;
  flex-wrap: wrap;
}

.sb-pagination a,
.sb-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--clr-light);
  background: var(--clr-white);
  transition: var(--transition);
  cursor: pointer;
  color: var(--clr-dark);
}

.sb-pagination a:hover { border-color: var(--clr-dark); }
.sb-pagination .pg-current { background: var(--clr-dark); color: var(--clr-white); border-color: var(--clr-dark); }
.sb-pagination .pg-ellipsis { border: none; background: none; cursor: default; }
.sb-pagination .pg-arrow { font-size: 16px; }

/* ─── Loader spinner ─────────────────────────────────────────── */
.sb-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
}

.sb-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--clr-light);
  border-top-color: var(--clr-dark);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Modal lightbox UV ──────────────────────────────────────── */
.sb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 1000;
  display: none;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
}

.sb-modal-overlay.open { display: grid; }

.sb-modal-box {
  background: #111;
  border-radius: 10px;
  max-width: 800px;
  width: 100%;
  color: var(--clr-white);
  overflow: hidden;
  position: relative;
}

.sb-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--clr-white);
  font-size: 28px;
  line-height: 1;
  z-index: 10;
  opacity: .7;
  transition: opacity var(--transition);
}

.sb-modal-close:hover { opacity: 1; }

.sb-modal-img-wrap {
  overflow-x: auto;
  max-height: 70vh;
  background: #000;
}

.sb-modal-img-wrap img {
  max-height: 70vh;
  width: auto;
  max-width: none;
}

.sb-modal-info {
  padding: 20px 24px;
}

.sb-modal-info h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: rgba(255,255,255,.5);
  font-weight: 400;
  margin-bottom: 2px;
}

.sb-modal-info p { font-size: 1.2rem; font-weight: 600; margin-bottom: 16px; }

.sb-btn-order {
  display: inline-block;
  padding: 10px 22px;
  background: #c9a96e;
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.sb-btn-order:hover { background: #b8924e; }

/* ─── RAL catalog ────────────────────────────────────────────── */
.sb-ral-wrap { padding: 28px 0 60px; }

.sb-ral-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.sb-ral-filter-btn {
  padding: 7px 18px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: var(--clr-white);
  font-size: 13.5px;
  transition: var(--transition);
  color: var(--clr-dark);
}

.sb-ral-filter-btn:hover,
.sb-ral-filter-btn.active {
  background: var(--clr-dark);
  color: var(--clr-white);
  border-color: var(--clr-dark);
}

.sb-ral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.sb-ral-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  background: var(--clr-white);
  cursor: pointer;
}

.sb-ral-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.sb-ral-item:hover img { transform: scale(1.04); }

.sb-ral-code {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 11.5px;
  padding: 3px 7px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}

.sb-ral-item:hover .sb-ral-code { opacity: 1; }

/* RAL lightbox */
.sb-ral-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 24px;
}

.sb-ral-modal-overlay.open { display: grid; }

.sb-ral-modal-box {
  background: #111;
  border-radius: 10px;
  max-width: 640px;
  width: 100%;
  color: var(--clr-white);
  overflow: hidden;
  position: relative;
  text-align: center;
}

.sb-ral-modal-box img {
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  background: #000;
}

.sb-ral-modal-caption {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
}

.sb-ral-modal-sub {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin-top: 4px;
}

.sb-ral-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--clr-white);
  font-size: 26px;
  opacity: .7;
  transition: opacity var(--transition);
}

.sb-ral-modal-close:hover { opacity: 1; }

/* ─── Mesaje empty / error ───────────────────────────────────── */
.sb-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--clr-mid);
  font-size: 1rem;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.sb-footer {
  background: var(--clr-dark);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
}

.sb-footer a { color: rgba(255,255,255,.6); }
.sb-footer a:hover { color: #fff; }

/* ─── Admin panou ─────────────────────────────────────────────── */
.sb-admin-wrap { max-width: 960px; margin: 40px auto; padding: 0 20px 60px; }

.sb-admin-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-light);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.sb-admin-card h2 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--clr-light);
}

.sb-form-row { margin-bottom: 16px; }
.sb-form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

.sb-form-row input,
.sb-form-row select,
.sb-form-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--clr-light);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.sb-form-row input:focus,
.sb-form-row select:focus,
.sb-form-row textarea:focus { border-color: var(--clr-dark); }

.sb-form-row .hint { font-size: 12px; color: #888; margin-top: 4px; }

.sb-btn {
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  cursor: pointer;
}

.sb-btn-primary {
  background: var(--clr-btn);
  color: #fff;
}
.sb-btn-primary:hover { background: var(--clr-btn-h); }

.sb-btn-danger {
  background: #fff;
  color: #e53e3e;
  border: 1px solid #e53e3e;
}
.sb-btn-danger:hover { background: #fff0f0; }

.sb-alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}

.sb-alert-ok { background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; }
.sb-alert-err { background: #fff5f5; border: 1px solid #feb2b2; color: #c53030; }

.sb-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sb-table th { text-align: left; padding: 10px 12px; background: var(--clr-bg); font-weight: 600; border-bottom: 2px solid var(--clr-light); }
.sb-table td { padding: 9px 12px; border-bottom: 1px solid var(--clr-light); vertical-align: middle; }
.sb-table tr:hover td { background: var(--clr-bg); }
.sb-table img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sb-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .sb-ral-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 9px; }
  .sb-ral-item img { height: 95px; }
  .sb-toolbar-inner { gap: 8px; }
  .sb-search-wrap { max-width: 100%; }
  .sb-nav { gap: 4px; }
  .sb-nav a { padding: 6px 10px; font-size: 13px; }
  .sb-hero { padding: 48px 0 40px; }
}

@media (max-width: 480px) {
  .sb-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .sb-ral-grid { grid-template-columns: repeat(3, 1fr); }
  .sb-modal-img-wrap img { width: 100%; }
}

/* ══════════════════════════════════════════════════
   LOGO – structura cu 2 rânduri
   ══════════════════════════════════════════════════ */
/* Desktop: pe un rând */
.sb-logo {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
  text-decoration: none;
}
.logo-line1 { color: #fff; }
.logo-line2 { color: #c9a96e; }

/* Mobile: 2 rânduri */
@media (max-width: 600px) {
  .sb-header-inner { height: 52px; }
  .sb-logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.15;
  }
  .logo-line1 {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
  }
  .logo-line2 {
    font-size: .72rem;
    font-weight: 500;
    color: #c9a96e;
    letter-spacing: .5px;
  }
  .sb-nav a {
    font-size: 12px;
    padding: 5px 7px;
  }
}


/* ══════════════════════════════════════════════════════════
   CATALOG UV – Layout, Sidebar, Grid, Lightbox, Mobile
   ══════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════ */
.uv-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 60px);
}

/* ══════════════════════════════════════════════════
   SIDEBAR DESKTOP
   ══════════════════════════════════════════════════ */
.uv-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e8e8e4;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.uv-sidebar::-webkit-scrollbar { width: 4px; }
.uv-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.uv-sidebar-header {
  padding: 14px 14px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #aaa;
  border-bottom: 1px solid #f0f0ee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.uv-sidebar-search { padding: 10px 10px 8px; border-bottom: 1px solid #f0f0ee; }
.uv-sidebar-search input {
  width: 100%; box-sizing: border-box;
  padding: 7px 10px 7px 28px;
  border: 1px solid #e4e4e0; border-radius: 6px;
  font-size: 13px; outline: none; font-family: inherit;
  background: #f8f8f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 8px center;
  transition: border-color .2s, background .2s;
}
.uv-sidebar-search input:focus { border-color: #1a1a1a; background: #fff; }

.uv-color-block { padding: 10px 10px 8px; border-bottom: 1px solid #f0f0ee; }
.uv-color-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #aaa; margin-bottom: 8px; }
.uv-color-dots { display: flex; flex-wrap: wrap; gap: 6px; }

.uv-color-all {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid #ccc; cursor: pointer;
  background: conic-gradient(red,yellow,green,blue,red);
  flex-shrink: 0; transition: transform .15s;
}
.uv-color-all.active, .uv-color-all:hover { transform: scale(1.1); border: 2px solid #1a1a1a; }

.uv-color-dot-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s, border-color .15s; flex-shrink: 0;
}
.uv-color-dot-btn:hover { transform: scale(1.12); }
.uv-color-dot-btn.active { border-color: #1a1a1a; transform: scale(1.08); }

.uv-clear-btn {
  margin: 8px 10px 0; display: none; width: calc(100% - 20px);
  padding: 6px 10px; border: 1px solid #e53e3e; border-radius: 6px;
  background: #fff; color: #e53e3e; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; text-align: center;
}
.uv-clear-btn:hover { background: #fff0f0; }
.uv-clear-btn.visible { display: block; }

.uv-cat-list { padding: 6px 0; }
.uv-main-cat { padding: 0; }
.uv-main-cat-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 8px 14px; background: none; border: none;
  font-size: 13px; font-weight: 600; color: #1a1a1a; cursor: pointer;
  text-align: left; transition: background .15s; font-family: inherit;
}
.uv-main-cat-btn:hover { background: #f8f8f6; }
.uv-main-cat-arrow { font-size: 9px; color: #bbb; transition: transform .2s; flex-shrink: 0; }
.uv-main-cat-btn.open .uv-main-cat-arrow { transform: rotate(180deg); }

.uv-sub-list { display: none; padding-bottom: 2px; }
.uv-sub-list.open { display: block; }

.uv-sub-item {
  display: block; padding: 6px 14px 6px 26px;
  font-size: 12.5px; color: #555; cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uv-sub-item:hover { background: #f0f0ee; color: #1a1a1a; }
.uv-sub-item.active { background: #f0f0ee; color: #1a1a1a; font-weight: 600; }
.uv-sub-item.active::before { content: '▸ '; font-size: 9px; }

/* ══════════════════════════════════════════════════
   ZONA GALERIE
   ══════════════════════════════════════════════════ */
.uv-main { flex: 1; min-width: 0; padding: 20px 20px 48px; }

.uv-gallery-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.uv-gallery-title { font-size: .95rem; font-weight: 600; color: #1a1a1a; }

/* Grid desktop: 2 coloane, imagini late (aspect 4:1) */
.uv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.uv-img-item {
  border-radius: 7px; overflow: hidden;
  background: #e8e8e4;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  cursor: pointer; position: relative;
  transition: transform .18s, box-shadow .18s;
  aspect-ratio: 4 / 1;
}
.uv-img-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.16); }

.uv-img-item img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: left center;
  display: block;
}

.uv-img-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; align-items: flex-end; padding: 8px;
  transition: background .18s;
}
.uv-img-item:hover .uv-img-overlay { background: rgba(0,0,0,.28); }

.uv-img-nr {
  color: #fff; font-size: 11px; font-weight: 600;
  background: rgba(0,0,0,.55); padding: 2px 7px;
  border-radius: 4px; opacity: 0; transition: opacity .18s;
}
.uv-img-item:hover .uv-img-nr { opacity: 1; }

/* ══════════════════════════════════════════════════
   LIGHTBOX UV
   Desktop: 960px max, fit in view, no scroll
   Mobile: 960px natural width, scroll L→R
   ══════════════════════════════════════════════════ */
.uv-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 1000; display: none;
  align-items: center; justify-content: center;
  padding: 16px;
}
.uv-modal-overlay.open { display: flex; }

.uv-modal-box {
  background: #111; border-radius: 10px;
  position: relative; color: #fff;
  width: min(960px, 100%);
  overflow: hidden;
}

.uv-modal-close {
  position: absolute; top: 10px; right: 12px;
  background: rgba(0,0,0,.65); border: none; color: #fff;
  font-size: 22px; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  opacity: .85; transition: opacity .2s, background .2s;
}
.uv-modal-close:hover { opacity: 1; background: rgba(0,0,0,.9); }

/* Container imagine */
.uv-modal-img-wrap { background: #000; position: relative; line-height: 0; }

/* Desktop: overflow hidden, img la lățime 100% */
.uv-modal-img-inner {
  overflow: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.uv-modal-img-inner::-webkit-scrollbar { display: none; }

.uv-modal-img-inner img {
  display: block;
  /* Desktop: se încadrează în container, fără scroll */
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: contain;
}

/* Bara progres (mobile only) */
.uv-modal-progress {
  position: absolute; bottom: 0; left: 0;
  height: 3px; background: #c9a96e; width: 0%;
  transition: width linear; display: none;
}

.uv-modal-info {
  padding: 12px 18px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.uv-modal-meta { font-size: 13px; color: rgba(255,255,255,.6); }
.uv-modal-meta strong { color: #fff; font-size: 14px; }

.uv-pan-hint {
  font-size: 11px; color: rgba(255,255,255,.38);
  padding: 0 18px 8px; text-align: center; display: none;
}

/* ══════════════════════════════════════════════════
   PAGINARE
   ══════════════════════════════════════════════════ */
.sb-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 20px; }
.sb-pg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border: 1px solid #e0e0dc; border-radius: 7px;
  background: #fff; color: #1a1a1a; text-decoration: none;
  font-size: 13px; font-weight: 500; transition: background .15s, border-color .15s;
}
.sb-pg-btn:hover { background: #f5f5f3; border-color: #bbb; }
.sb-pg-btn.pg-current { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.pg-ellipsis { display: inline-flex; align-items: center; padding: 0 4px; color: #aaa; }
.pg-arrow { font-size: 16px; }

.sb-loader { padding: 60px 0; display: flex; justify-content: center; }
.sb-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #e0e0dc; border-top-color: #1a1a1a;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sb-empty { text-align: center; padding: 60px 0; color: #aaa; font-size: .95rem; }

/* ══════════════════════════════════════════════════
   MOBILE ≤ 768px
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .uv-layout { flex-direction: column; }
  .uv-sidebar { display: none; }  /* ascuns pe mobile */

  /* Bara mobilă: verticală, ordonată */
  .uv-mobile-bar {
    background: #fff;
    border-bottom: 1px solid #e8e8e4;
    position: sticky;
    top: 52px;   /* sub header 52px pe mobile */
    z-index: 80;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  /* Rând 1: câutare */
  .uv-mob-search-wrap { width: 100%; }
  .uv-mobile-search {
    width: 100%; box-sizing: border-box;
    padding: 9px 12px 9px 34px;
    border: 1px solid #e0e0dc; border-radius: 8px;
    font-size: 14px; font-family: inherit; outline: none;
    background: #f8f8f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 10px center;
    -webkit-appearance: none;
  }
  .uv-mobile-search:focus { border-color: #1a1a1a; background-color: #fff; }

  /* Rând 2: dropdown categorii */
  .uv-mob-cat-wrap { width: 100%; }
  .uv-mobile-cat-select {
    width: 100%; box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #e0e0dc; border-radius: 8px;
    font-size: 14px; font-family: inherit; outline: none;
    background: #f8f8f6; color: #1a1a1a;
    appearance: auto; -webkit-appearance: auto;
  }

  /* Rând 3: culori + reset */
  .uv-mob-colors-wrap {
    display: flex; align-items: center;
    flex-wrap: nowrap;           /* TOATE culorile pe un singur rând */
    overflow-x: auto;            /* scroll orizontal dacă nu încap */
    gap: 6px;
    scrollbar-width: none;       /* ascundem scrollbar-ul pe mobile */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .uv-mob-colors-wrap::-webkit-scrollbar { display: none; }
  .uv-mob-clear-btn {
    /* Scos din rândul culorilor – apare ca element separat */
    width: 100%; box-sizing: border-box;
    padding: 7px 12px;
    border: 1px solid #e53e3e; border-radius: 7px;
    background: #fff; color: #e53e3e;
    font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    display: none; text-align: center;
    margin-top: 2px;
  }
  .uv-mob-clear-btn.visible { display: block; }

  /* Butonul de culori pe mobile – ușor mai mari */
  .uv-mob-colors-wrap .uv-color-all,
  .uv-mob-colors-wrap .uv-color-dot-btn {
    width: 28px; height: 28px;
  }

  /* Galerie: 1 coloană, thumbnails mai mari */
  .uv-main { padding: 12px 10px 40px; }
  .uv-grid { grid-template-columns: 1fr; gap: 10px; }
  .uv-img-item { aspect-ratio: 3.5 / 1; }  /* thumbnails mai înalte, mai vizibile */

  /* Lightbox mobile */
  .uv-modal-overlay { padding: 6px; }
  .uv-modal-box {
    width: 100%;
    border-radius: 8px;
    /* IMPORTANT: scoatem overflow:hidden care tăia imaginea la lățimea ecranului */
    overflow: visible;
  }

  /* Scroll-ul e pe .uv-modal-img-wrap (nu pe inner) */
  .uv-modal-img-wrap {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px 8px 0 0;
  }

  /* Inner devine transparent – nu mai clipuiește nimic */
  .uv-modal-img-inner {
    overflow: visible !important;
    display: block !important;
    width: fit-content !important;
    min-width: 100%;
  }

  /* Imaginea la 960px – mai lată decât ecranul → wrap face scroll */
  /* max-width: none anulează global rule "img { max-width: 100% }" din main.css */
  #uv-modal-img,
  .uv-modal-img-inner img {
    width: 960px !important;
    min-width: 960px !important;
    max-width: 960px !important;
    height: auto !important;
    max-height: none !important;
    object-fit: unset !important;
    display: block !important;
    flex-shrink: 0 !important;
  }

  .uv-modal-progress { display: block; }
  .uv-pan-hint       { display: block; }
}

/* Desktop: bara mobilă ascunsă */
@media (min-width: 769px) {
  .uv-mobile-bar { display: none; }
}
/* ── Logo imagine PNG ──────────────────────────────────────── */
.sb-logo-img {
  max-height: 42px;
  width: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 600px) {
  .sb-logo-img {
    max-height: 34px;
  }
}
