/* ===================================================
   Obleklo.eu - Design System & Custom CSS
   Glami/ShopZone Inspired Aesthetic with Light & Dark Modes
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.hero-title {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* --- LIGHT MODE VARIABLES (DEFAULT) --- */
:root {
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-secondary: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  /* Brand Crimson Accent */
  --accent-red: #e11d48;
  --accent-red-hover: #be123c;
  --accent-light-red: #ffe4e6;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- DARK MODE VARIABLES --- */
[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-card: #151c2c;
  --bg-secondary: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  
  --accent-red: #f43f5e;
  --accent-red-hover: #fb7185;
  --accent-light-red: rgba(244, 63, 94, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* --- BASE STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* FORM INPUTS, SELECTS & CONTROLS */
input, select, textarea {
  background-color: var(--bg-secondary) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  transition: var(--transition);
}

select option {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-red) !important;
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-light-red);
}

/* --- LOGO STYLING --- */
.logo-container {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
  user-select: none;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--accent-red);
  color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
  transition: var(--transition);
}

.logo-container:hover .logo-badge {
  transform: scale(1.08) rotate(-3deg);
}

.logo-text-main {
  color: #ffffff;
  font-weight: 800;
}

[data-theme="light"] .logo-text-main {
  color: #0f172a;
}

.logo-suffix {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-red);
  margin-left: -1px;
}

/* --- HEADER & NAVBAR --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.search-input {
  background-color: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem 0.5rem 2.5rem;
  width: 100%;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-light-red);
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--accent-light-red);
  color: var(--accent-red);
}

/* --- PRODUCT GRID (MOBILE-FIRST 2 COLUMNS) --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* --- PRODUCT CARD (GLAMI/SHOPZONE STYLE) --- */
.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

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

.product-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 130%; /* 1:1.3 aspect ratio for apparel */
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.product-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img {
  transform: scale(1.05);
}

/* DISCOUNT BADGE (-45%) */
.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: var(--accent-red);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4);
  z-index: 2;
}

/* VISUAL SIMILARITY MATCH BUTTON ("Намери подобни") */
.similarity-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.9;
  cursor: pointer;
  transition: var(--transition);
  z-index: 3;
}

.similarity-btn:hover {
  background: var(--accent-red);
  transform: scale(1.05);
}

.product-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-brand {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.product-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.product-prices {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.price-current {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-red);
}

.price-old {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* --- MOBILE STICKY FILTER BAR --- */
.sticky-filter-bar {
  position: sticky;
  top: 61px;
  z-index: 40;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background-color: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.filter-chip.active,
.filter-chip:hover {
  background-color: var(--accent-light-red);
  color: var(--accent-red);
  border-color: var(--accent-red);
}

/* --- IN-GRID & SIDEBAR BANNERS --- */
.banner-grid-card {
  grid-column: span 2;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: 12px;
  padding: 1.25rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

/* --- SMART CROSS-LINKING FOOTER --- */
.smart-crosslinks {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1rem;
}

.crosslink-tag {
  display: inline-block;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  margin: 0.25rem;
  transition: var(--transition);
}

.crosslink-tag:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
  transform: translateY(-1px);
}
