/* ============================================================
   SUNGLASSES SHOP PRO — Public CSS
   Design: Luxury Editorial | Dark/Light Adaptive | Animated
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --sgs-accent:     #C9A84C;
  --sgs-accent-2:   #E8C87A;
  --sgs-bg:         #ffffff;
  --sgs-bg-2:       #f8f8f6;
  --sgs-card-bg:    #ffffff;
  --sgs-text:       #111111;
  --sgs-text-2:     #555555;
  --sgs-text-3:     #999999;
  --sgs-border:     #e8e8e4;
  --sgs-shadow:     0 4px 24px rgba(0,0,0,0.08);
  --sgs-shadow-hover: 0 16px 48px rgba(0,0,0,0.15);
  --sgs-radius:     12px;
  --sgs-radius-sm:  6px;
  --sgs-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sgs-font-head:  'Syne', sans-serif;
  --sgs-font-body:  'Inter', sans-serif;
}

/* ---------- Reset & Base ---------- */
.sgs-shop-wrap, .sgs-single-wrap {
  font-family: var(--sgs-font-body);
  color: var(--sgs-text);
  background: var(--sgs-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sgs-shop-wrap *, .sgs-single-wrap * {
  box-sizing: border-box;
}

/* ---------- Language Bar ---------- */
.sgs-lang-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--sgs-border);
  margin-bottom: 20px;
  font-size: 13px;
}

.sgs-lang-switcher {
  display: flex;
  gap: 4px;
}

.sgs-lang {
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--sgs-text-2);
  font-size: 12px;
  font-weight: 500;
  transition: var(--sgs-transition);
  border: 1px solid transparent;
}

.sgs-lang.active {
  background: var(--sgs-accent);
  color: #fff;
  font-weight: 700;
}

.sgs-lang:hover:not(.active) {
  border-color: var(--sgs-accent);
  color: var(--sgs-accent);
}

.sgs-contact-bar {
  display: flex;
  gap: 16px;
}

.sgs-contact-link {
  text-decoration: none;
  color: var(--sgs-text-2);
  font-size: 12px;
  transition: color var(--sgs-transition);
}

.sgs-contact-link:hover { color: var(--sgs-accent); }

/* ---------- Shop Header ---------- */
.sgs-shop-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.sgs-shop-title {
  font-family: var(--sgs-font-head);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--sgs-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sgs-title-icon {
  animation: sgs-float 3s ease-in-out infinite;
}

@keyframes sgs-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

.sgs-products-count {
  font-size: 13px;
  color: var(--sgs-text-3);
  margin: 6px 0 0;
  font-family: var(--sgs-font-body);
}

.sgs-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Search */
.sgs-search-wrap {
  position: relative;
}

.sgs-search-input {
  padding: 10px 16px;
  border: 1.5px solid var(--sgs-border);
  border-radius: 30px;
  font-size: 13px;
  font-family: var(--sgs-font-body);
  background: var(--sgs-bg-2);
  color: var(--sgs-text);
  outline: none;
  width: 180px;
  transition: var(--sgs-transition);
}

.sgs-search-input:focus {
  border-color: var(--sgs-accent);
  width: 220px;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

/* Sort */
.sgs-sort-select {
  padding: 10px 14px;
  border: 1.5px solid var(--sgs-border);
  border-radius: 30px;
  font-size: 13px;
  font-family: var(--sgs-font-body);
  background: var(--sgs-bg-2);
  color: var(--sgs-text);
  cursor: pointer;
  outline: none;
  transition: border-color var(--sgs-transition);
}

.sgs-sort-select:focus { border-color: var(--sgs-accent); }

/* Filter toggle */
.sgs-filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--sgs-text);
  color: var(--sgs-bg);
  border: none;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sgs-font-body);
  transition: var(--sgs-transition);
  position: relative;
}

.sgs-filter-toggle:hover {
  background: var(--sgs-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

.sgs-filter-icon {
  display: inline-block;
  transition: transform var(--sgs-transition);
}

.sgs-filter-toggle.open .sgs-filter-icon {
  transform: rotate(180deg);
}

.sgs-active-count {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: var(--sgs-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* View Toggle */
.sgs-view-toggle {
  display: flex;
  gap: 2px;
  border: 1.5px solid var(--sgs-border);
  border-radius: 8px;
  overflow: hidden;
}

.sgs-view-btn {
  padding: 8px 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--sgs-text-3);
  transition: var(--sgs-transition);
}

.sgs-view-btn.active {
  background: var(--sgs-text);
  color: var(--sgs-bg);
}

/* ---------- Shop Body ---------- */
.sgs-shop-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .sgs-shop-body { grid-template-columns: 1fr; }
}

/* ---------- Sidebar ---------- */
.sgs-sidebar {
  position: sticky;
  top: 20px;
  background: var(--sgs-card-bg);
  border: 1.5px solid var(--sgs-border);
  border-radius: var(--sgs-radius);
  overflow: hidden;
  transition: var(--sgs-transition);
}

.sgs-sidebar.hidden { display: none; }

.sgs-sidebar-inner {
  padding: 20px;
}

.sgs-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.sgs-sidebar-header h3 {
  font-family: var(--sgs-font-head);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.sgs-reset-filters {
  font-size: 11px;
  color: var(--sgs-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--sgs-font-body);
  font-weight: 600;
  text-decoration: underline;
}

.sgs-sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--sgs-text-3);
}

/* Filter Groups */
.sgs-filter-group {
  border-bottom: 1px solid var(--sgs-border);
  padding: 14px 0;
}

.sgs-filter-group:last-child { border-bottom: none; }

.sgs-filter-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--sgs-text);
}

.sgs-filter-arrow {
  font-size: 16px;
  color: var(--sgs-text-3);
  transition: transform var(--sgs-transition);
}

.sgs-filter-group.open .sgs-filter-arrow {
  transform: rotate(180deg);
}

.sgs-filter-body {
  margin-top: 10px;
  animation: sgs-slidedown 0.2s ease;
}

@keyframes sgs-slidedown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Price Slider */
.sgs-price-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sgs-price-input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--sgs-border);
  border-radius: var(--sgs-radius-sm);
  font-size: 13px;
  font-family: var(--sgs-font-body);
  color: var(--sgs-text);
  background: var(--sgs-bg-2);
  outline: none;
  text-align: center;
}

.sgs-currency {
  font-size: 12px;
  color: var(--sgs-text-3);
  font-weight: 600;
}

.sgs-range-slider {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}

.sgs-range-track {
  position: absolute;
  width: 100%;
  height: 4px;
  background: var(--sgs-border);
  border-radius: 2px;
  pointer-events: none;
}

.sgs-range-fill {
  position: absolute;
  height: 100%;
  background: var(--sgs-accent);
  border-radius: 2px;
}

.sgs-range-slider input[type=range] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  background: none;
  pointer-events: none;
  height: 4px;
}

.sgs-range-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--sgs-accent);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  pointer-events: all;
  cursor: grab;
  transition: transform 0.1s;
}

.sgs-range-slider input[type=range]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.2);
}

/* Toggle */
.sgs-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.sgs-toggle-input { display: none; }

.sgs-toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--sgs-border);
  border-radius: 10px;
  position: relative;
  transition: background var(--sgs-transition);
  flex-shrink: 0;
}

.sgs-toggle-switch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--sgs-transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sgs-toggle-input:checked + .sgs-toggle-switch {
  background: var(--sgs-accent);
}

.sgs-toggle-input:checked + .sgs-toggle-switch::after {
  transform: translateX(16px);
}

/* Filter Items */
.sgs-filter-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.sgs-filter-items::-webkit-scrollbar { width: 3px; }
.sgs-filter-items::-webkit-scrollbar-track { background: transparent; }
.sgs-filter-items::-webkit-scrollbar-thumb { background: var(--sgs-border); border-radius: 2px; }

.sgs-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

.sgs-filter-check { display: none; }

.sgs-check-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--sgs-border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--sgs-transition);
  position: relative;
}

.sgs-filter-check:checked + .sgs-check-box {
  background: var(--sgs-accent);
  border-color: var(--sgs-accent);
}

.sgs-filter-check:checked + .sgs-check-box::after {
  content: '✓';
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.sgs-check-label {
  flex: 1;
  color: var(--sgs-text);
}

.sgs-check-count {
  font-size: 11px;
  color: var(--sgs-text-3);
  background: var(--sgs-bg-2);
  padding: 1px 5px;
  border-radius: 8px;
}

/* Apply button */
.sgs-apply-filters {
  width: 100%;
  padding: 12px;
  background: var(--sgs-accent);
  color: #fff;
  border: none;
  border-radius: var(--sgs-radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sgs-font-body);
  margin-top: 16px;
  transition: var(--sgs-transition);
  letter-spacing: 0.02em;
}

.sgs-apply-filters:hover {
  background: var(--sgs-accent-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.35);
}

/* ---------- Active Filter Chips ---------- */
.sgs-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  animation: sgs-fadein 0.3s ease;
}

.sgs-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sgs-accent);
  animation: sgs-popin 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes sgs-popin {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.sgs-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
}

/* ---------- Products Grid ---------- */
.sgs-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sgs-products-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.sgs-products-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }

.sgs-products-grid.list-view {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  .sgs-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .sgs-products-grid { grid-template-columns: 1fr; }
}

/* ---------- Product Card ---------- */
.sgs-card {
  background: var(--sgs-card-bg);
  border: 1.5px solid var(--sgs-border);
  border-radius: var(--sgs-radius);
  overflow: hidden;
  position: relative;
  transition: var(--sgs-transition);
  animation: sgs-cardin 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes sgs-cardin {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sgs-card:hover {
  border-color: var(--sgs-accent);
  box-shadow: var(--sgs-shadow-hover);
  transform: translateY(-4px);
}

/* Badges */
.sgs-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sgs-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sgs-badge-sale { background: #FF3B30; color: #fff; }
.sgs-badge-new  { background: #34C759; color: #fff; }
.sgs-badge-best { background: var(--sgs-accent); color: #fff; font-size: 14px; padding: 2px 6px; }
.sgs-badge-custom { background: #5856D6; color: #fff; }

/* Card Actions */
.sgs-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--sgs-transition);
}

.sgs-card:hover .sgs-card-actions {
  opacity: 1;
  transform: translateX(0);
}

.sgs-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--sgs-border);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--sgs-transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sgs-action-btn:hover {
  border-color: var(--sgs-accent);
  color: var(--sgs-accent);
  transform: scale(1.1);
}

.sgs-wish-btn.active { color: #FF3B30; border-color: #FF3B30; }

/* Card Image */
.sgs-card-img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--sgs-bg-2);
}

.sgs-card-img-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

.sgs-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sgs-img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.sgs-card:hover .sgs-img-primary { transform: scale(1.05); }
.sgs-card:hover .sgs-img-hover   { opacity: 1; }

.sgs-card-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: var(--sgs-text-3);
}

.sgs-out-stock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--sgs-text-2);
  backdrop-filter: blur(2px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Card Body */
.sgs-card-body {
  padding: 14px 16px 16px;
}

.sgs-card-brand {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sgs-accent);
  margin-bottom: 4px;
}

.sgs-card-title {
  font-family: var(--sgs-font-head);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
}

.sgs-card-title a {
  text-decoration: none;
  color: var(--sgs-text);
  transition: color var(--sgs-transition);
}

.sgs-card-title a:hover { color: var(--sgs-accent); }

.sgs-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.sgs-spec-pill {
  font-size: 10px;
  padding: 2px 7px;
  border: 1px solid var(--sgs-border);
  border-radius: 10px;
  color: var(--sgs-text-2);
  font-weight: 500;
}

/* Stars */
.sgs-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.sgs-stars { display: flex; gap: 2px; }
.sgs-star { font-size: 12px; color: var(--sgs-border); }
.sgs-star.filled { color: var(--sgs-accent); }
.sgs-review-count { font-size: 11px; color: var(--sgs-text-3); }

/* Price */
.sgs-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sgs-price-old {
  font-size: 12px;
  color: var(--sgs-text-3);
  text-decoration: line-through;
}

.sgs-price-current {
  font-family: var(--sgs-font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--sgs-text);
  line-height: 1;
}

.sgs-curr {
  font-size: 12px;
  font-weight: 500;
  color: var(--sgs-text-3);
  margin-left: 2px;
}

.sgs-discount-badge {
  background: #FF3B30;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Card CTA */
.sgs-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 16px;
  background: var(--sgs-text);
  color: var(--sgs-bg);
  border: 2px solid var(--sgs-text);
  border-radius: var(--sgs-radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--sgs-font-body);
  transition: var(--sgs-transition);
  letter-spacing: 0.02em;
}

.sgs-card-btn:hover {
  background: var(--sgs-accent);
  border-color: var(--sgs-accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201,168,76,0.3);
}

.sgs-card-btn.disabled {
  background: var(--sgs-border);
  border-color: var(--sgs-border);
  color: var(--sgs-text-3);
  pointer-events: none;
}

.sgs-btn-arrow {
  transition: transform var(--sgs-transition);
}

.sgs-card-btn:hover .sgs-btn-arrow {
  transform: translateX(4px);
}

/* ---------- Loading ---------- */
.sgs-loading {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--sgs-radius);
  gap: 12px;
  font-size: 13px;
  color: var(--sgs-text-2);
}

.sgs-loading-ring {
  width: 40px;
  height: 40px;
  border: 3px solid var(--sgs-border);
  border-top-color: var(--sgs-accent);
  border-radius: 50%;
  animation: sgs-spin 0.7s linear infinite;
}

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

/* ---------- No Products ---------- */
.sgs-no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  color: var(--sgs-text-3);
}

.sgs-no-products-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: sgs-float 3s ease-in-out infinite;
}

/* ---------- Pagination / Load More ---------- */
.sgs-pagination {
  margin-top: 40px;
  text-align: center;
}

.sgs-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: none;
  border: 2px solid var(--sgs-text);
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--sgs-font-body);
  color: var(--sgs-text);
  transition: var(--sgs-transition);
  letter-spacing: 0.03em;
}

.sgs-load-more:hover {
  background: var(--sgs-accent);
  border-color: var(--sgs-accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(201,168,76,0.3);
}

.sgs-load-arrow {
  animation: sgs-bounce 1.5s ease infinite;
}

@keyframes sgs-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- Modal ---------- */
.sgs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--sgs-transition);
  backdrop-filter: blur(4px);
  padding: 20px;
}

.sgs-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sgs-modal-box {
  background: var(--sgs-card-bg);
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: var(--sgs-transition);
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}

.sgs-modal-overlay.open .sgs-modal-box {
  transform: translateY(0) scale(1);
}

.sgs-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--sgs-border);
  background: var(--sgs-bg);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: var(--sgs-transition);
}

.sgs-modal-close:hover {
  background: var(--sgs-text);
  color: var(--sgs-bg);
  border-color: var(--sgs-text);
}

.sgs-modal-content { padding: 28px; }

/* Quick View Inner */
.sgs-quickview-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 600px) {
  .sgs-quickview-inner { grid-template-columns: 1fr; }
}

.sgs-qv-gallery img {
  width: 100%;
  border-radius: var(--sgs-radius);
  object-fit: cover;
  aspect-ratio: 1;
}

.sgs-qv-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.sgs-qv-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--sgs-transition);
}

.sgs-qv-thumb.active,
.sgs-qv-thumb:hover { border-color: var(--sgs-accent); }

.sgs-qv-thumb img { width: 100%; height: 100%; object-fit: cover; }

.sgs-qv-title {
  font-family: var(--sgs-font-head);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}

.sgs-qv-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.sgs-price-old { font-size: 13px; color: var(--sgs-text-3); text-decoration: line-through; }
.sgs-price-current { font-family: var(--sgs-font-head); font-size: 24px; font-weight: 700; color: var(--sgs-text); }

.sgs-qv-stock {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.sgs-qv-stock.in-stock { color: #34C759; }
.sgs-qv-stock.out-stock { color: #FF3B30; }

.sgs-qv-desc {
  font-size: 13px;
  color: var(--sgs-text-2);
  line-height: 1.6;
  margin-bottom: 12px;
}

.sgs-qv-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sgs-qv-feature {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  background: var(--sgs-bg-2);
  border-radius: 20px;
  font-weight: 500;
}

.sgs-qv-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.sgs-btn-primary {
  flex: 1;
  padding: 13px 20px;
  background: var(--sgs-accent);
  color: #fff;
  border: none;
  border-radius: var(--sgs-radius-sm);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--sgs-transition);
  font-family: var(--sgs-font-body);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sgs-btn-primary:hover {
  background: var(--sgs-accent-2);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201,168,76,0.35);
}

.sgs-btn-wish {
  width: 48px;
  height: 48px;
  border: 2px solid var(--sgs-border);
  background: none;
  border-radius: var(--sgs-radius-sm);
  font-size: 20px;
  cursor: pointer;
  transition: var(--sgs-transition);
}

.sgs-btn-wish:hover { border-color: #FF3B30; color: #FF3B30; }

.sgs-qv-more {
  font-size: 12px;
  color: var(--sgs-accent);
  text-decoration: none;
  font-weight: 600;
  display: block;
}

/* ---------- Toast ---------- */
.sgs-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--sgs-text);
  color: var(--sgs-bg);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  z-index: 99999;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.sgs-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ---------- Back To Top ---------- */
.sgs-back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--sgs-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201,168,76,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--sgs-transition);
  z-index: 9999;
}

.sgs-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sgs-back-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.5);
}

/* ---------- Single Product Page ---------- */
.sgs-single-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.sgs-breadcrumbs {
  font-size: 13px;
  color: var(--sgs-text-3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sgs-breadcrumbs a {
  text-decoration: none;
  color: var(--sgs-text-3);
  transition: color var(--sgs-transition);
}

.sgs-breadcrumbs a:hover { color: var(--sgs-accent); }

.sgs-single-lang {
  margin-bottom: 20px;
}

.sgs-single-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .sgs-single-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* Gallery */
.sgs-gallery-main {
  border-radius: var(--sgs-radius);
  overflow: hidden;
  position: relative;
  background: var(--sgs-bg-2);
  aspect-ratio: 1;
  cursor: zoom-in;
}

.sgs-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sgs-gallery-main:hover .sgs-main-img {
  transform: scale(1.04);
}

.sgs-single-badge-sale,
.sgs-single-badge-new {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  z-index: 2;
}

.sgs-single-badge-sale { background: #FF3B30; color: #fff; }
.sgs-single-badge-new  { background: #34C759; color: #fff; top: 52px; }

.sgs-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--sgs-transition);
}

.sgs-gallery-main:hover .sgs-zoom-hint { opacity: 1; }

.sgs-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sgs-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--sgs-border);
  transition: var(--sgs-transition);
}

.sgs-thumb.active,
.sgs-thumb:hover { border-color: var(--sgs-accent); }

.sgs-thumb img { width: 100%; height: 100%; object-fit: cover; }

.sgs-thumb-video {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sgs-bg-2);
  font-size: 24px;
}

/* Single Info */
.sgs-single-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sgs-accent);
  margin-bottom: 8px;
}

.sgs-single-title {
  font-family: var(--sgs-font-head);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.sgs-single-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.sgs-rating-num {
  font-weight: 700;
  font-size: 14px;
}

.sgs-reviews-link {
  font-size: 13px;
  color: var(--sgs-accent);
  cursor: pointer;
  text-decoration: underline;
}

.sgs-single-price {
  margin-bottom: 16px;
}

.sgs-price-old-lg {
  display: block;
  font-size: 14px;
  color: var(--sgs-text-3);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.sgs-save-amount {
  display: inline-block;
  font-size: 11px;
  color: #34C759;
  font-weight: 600;
  margin-bottom: 6px;
}

.sgs-price-lg {
  font-family: var(--sgs-font-head);
  font-size: 36px;
  font-weight: 800;
  color: var(--sgs-text);
  line-height: 1;
}

.sgs-stock-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.sgs-stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34C759;
  animation: sgs-pulse 2s ease-in-out infinite;
}

.sgs-stock-dot.out { background: #FF3B30; animation: none; }

@keyframes sgs-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(52,199,89,0); }
}

.sgs-stock-status.in-stock { color: #34C759; }
.sgs-stock-status.out-stock { color: #FF3B30; }

.sgs-low-stock {
  color: #FF9500;
  font-size: 11px;
  background: rgba(255,149,0,0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Key features */
.sgs-key-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.sgs-key-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sgs-text-2);
}

.sgs-feat-icon { font-size: 18px; }

/* CTA */
.sgs-single-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.sgs-btn-buy {
  flex: 1;
  min-width: 140px;
  padding: 15px 28px;
  background: var(--sgs-accent);
  color: #fff;
  border: none;
  border-radius: var(--sgs-radius);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--sgs-transition);
  font-family: var(--sgs-font-body);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sgs-btn-buy:hover {
  background: var(--sgs-accent-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.4);
}

.sgs-btn-notify,
.sgs-btn-wish-lg,
.sgs-btn-share {
  padding: 13px 18px;
  background: none;
  border: 2px solid var(--sgs-border);
  border-radius: var(--sgs-radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sgs-font-body);
  color: var(--sgs-text);
  transition: var(--sgs-transition);
}

.sgs-btn-wish-lg:hover,
.sgs-btn-notify:hover {
  border-color: var(--sgs-accent);
  color: var(--sgs-accent);
}

.sgs-btn-share:hover {
  border-color: var(--sgs-text);
  background: var(--sgs-text);
  color: var(--sgs-bg);
}

/* Tabs */
.sgs-tabs { margin-bottom: 20px; }

.sgs-tab-nav {
  display: flex;
  border-bottom: 2px solid var(--sgs-border);
  margin-bottom: 16px;
  gap: 0;
}

.sgs-tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--sgs-text-3);
  font-family: var(--sgs-font-body);
  transition: var(--sgs-transition);
}

.sgs-tab-btn.active {
  color: var(--sgs-text);
  border-bottom-color: var(--sgs-accent);
}

.sgs-tab-content { display: none; animation: sgs-fadein 0.3s ease; }
.sgs-tab-content.active { display: block; }

@keyframes sgs-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sgs-desc {
  font-size: 14px;
  color: var(--sgs-text-2);
  line-height: 1.7;
}

.sgs-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sgs-specs-table tr { border-bottom: 1px solid var(--sgs-border); }
.sgs-specs-table tr:last-child { border-bottom: none; }

.sgs-specs-table td {
  padding: 10px 0;
  vertical-align: top;
}

.sgs-specs-table td:first-child {
  color: var(--sgs-text-3);
  width: 45%;
  font-weight: 500;
}

.sgs-specs-table td:last-child {
  color: var(--sgs-text);
  font-weight: 600;
}

/* Section title */
.sgs-section-title {
  font-family: var(--sgs-font-head);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.sgs-related {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--sgs-border);
}

.sgs-related-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .sgs-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- List View ---------- */
.sgs-products-grid.list-view .sgs-card {
  display: grid;
  grid-template-columns: 160px 1fr;
}

.sgs-products-grid.list-view .sgs-card-img-wrap {
  aspect-ratio: 1;
  height: 100%;
}

/* ---------- Main relative for loading overlay ---------- */
.sgs-main { position: relative; }

/* ---------- Mobile Sidebar Drawer ---------- */
@media (max-width: 900px) {
  .sgs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    z-index: 9999;
    border-radius: 0 16px 16px 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 40px rgba(0,0,0,0.2);
  }

  .sgs-sidebar.open {
    transform: translateX(0);
  }

  .sgs-sidebar-close { display: flex !important; }

  .sgs-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
    backdrop-filter: blur(2px);
  }
}

/* ---------- Staggered Card Animations ---------- */
.sgs-card:nth-child(1)  { animation-delay: 0ms; }
.sgs-card:nth-child(2)  { animation-delay: 60ms; }
.sgs-card:nth-child(3)  { animation-delay: 120ms; }
.sgs-card:nth-child(4)  { animation-delay: 180ms; }
.sgs-card:nth-child(5)  { animation-delay: 240ms; }
.sgs-card:nth-child(6)  { animation-delay: 300ms; }
.sgs-card:nth-child(7)  { animation-delay: 360ms; }
.sgs-card:nth-child(8)  { animation-delay: 420ms; }
.sgs-card:nth-child(9)  { animation-delay: 480ms; }
.sgs-card:nth-child(10) { animation-delay: 540ms; }
.sgs-card:nth-child(11) { animation-delay: 600ms; }
.sgs-card:nth-child(12) { animation-delay: 660ms; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .sgs-shop-header { flex-direction: column; align-items: flex-start; }
  .sgs-header-controls { width: 100%; justify-content: space-between; }
  .sgs-search-input { width: 100%; }
  .sgs-single-grid { grid-template-columns: 1fr; }
  .sgs-key-features { grid-template-columns: 1fr; }
  .sgs-single-cta { flex-direction: column; }
  .sgs-btn-buy { width: 100%; }
}
