/*
Theme Name: Sleep Moon
Theme URI: https://sleepmoon.ro
Author: Valdeco Textile SRL
Description: Tema custom Sleep Moon - textile premium românești
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: Private
Text Domain: sleepmoon
*/

/* =====================
   VARIABILE & RESET
===================== */
:root {
  --blue: #0f91e3;
  --blue-dark: #0a6fb0;
  --blue-light: #e8f4fd;
  --gold: #ffb84d;
  --gold-dark: #e09a2a;
  --text: #1a1a2e;
  --text-light: #666;
  --bg: #ffffff;
  --bg-gray: #f8f9fa;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(15,145,227,0.10);
  --radius: 12px;
  --radius-sm: 6px;
  --font: 'Nunito', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

/* =====================
   TOPBAR
===================== */
.topbar {
  background: var(--blue);
  color: #fff;
  text-align: center;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* =====================
   HEADER
===================== */
.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.site-logo img { height: 50px; width: auto; }
.site-logo a { display: flex; align-items: center; }

/* Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-nav ul li a {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a {
  color: var(--blue);
  background: var(--blue-light);
}

/* Header Icons */
.header-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icons a {
  color: var(--text);
  font-size: 20px;
  position: relative;
  transition: color 0.2s;
}

.header-icons a:hover { color: var(--blue); }

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* =====================
   HERO SECTION
===================== */
.hero {
  background: linear-gradient(135deg, var(--blue-light) 0%, #fff 60%);
  padding: 80px 20px;
  overflow: hidden;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 span { color: var(--blue); }

.hero p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image img {
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15,145,227,0.2);
  max-height: 450px;
  width: 100%;
  object-fit: cover;
}

.hero-illustration {
  width: 100%;
  max-width: 480px;
  animation: float 4s ease-in-out infinite;
}
.hero-illustration svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(15,145,227,0.15));
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* =====================
   BUTTONS
===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--blue-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15,145,227,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover {
  background: var(--gold-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* =====================
   CATEGORIES GRID
===================== */
.section {
  padding: 60px 20px;
}

.section-alt { background: var(--bg-gray); }

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-light);
  font-size: 16px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.category-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  text-align: center;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15,145,227,0.2);
}

.category-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--blue-light) 0%, #e8f4fd 100%);
}
/* WooCommerce placeholder fallback styling */
.category-card img[src*="placeholder"] {
  object-fit: contain;
  padding: 20px;
  background: linear-gradient(135deg, var(--blue-light) 0%, #e8f4fd 100%);
  opacity: 0.6;
}

.category-card-body {
  padding: 16px;
}

.category-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.category-card span {
  font-size: 13px;
  color: var(--text-light);
}

/* =====================
   PRODUCTS GRID
===================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15,145,227,0.2);
}

.product-card-img {
  position: relative;
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s;
}

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

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.product-badge.sale { background: #e74c3c; }

.product-card-body {
  padding: 16px;
}

.product-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card-body h3 a { color: var(--text); }
.product-card-body h3 a:hover { color: var(--blue); }

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.price-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--blue);
}

.price-old {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
}

.btn-add-to-cart {
  width: 100%;
  justify-content: center;
  padding: 10px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

/* =====================
   USP SECTION
===================== */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}

.usp-item {
  padding: 24px 16px;
}

.usp-icon {
  width: 60px;
  height: 60px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
  color: var(--blue);
}

.usp-item h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.usp-item p {
  font-size: 14px;
  color: var(--text-light);
}

/* =====================
   FOOTER
===================== */
.site-footer {
  background: var(--text);
  color: #ccc;
  padding: 60px 20px 30px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img { height: 40px; filter: brightness(0) invert(1); margin-bottom: 16px; }

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.social-links { display: flex; gap: 12px; }

.social-links a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  transition: background 0.2s;
}

.social-links a:hover { background: var(--blue); color: #fff; }

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #ccc; font-size: 14px; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--blue); }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a { color: #ccc; }
.footer-bottom a:hover { color: var(--blue); }

/* =====================
   WOOCOMMERCE OVERRIDES
===================== */
.woocommerce-notices-wrapper { max-width: 1280px; margin: 20px auto; padding: 0 20px; }

.woocommerce ul.products { margin: 0 !important; padding: 0 !important; }
.woocommerce ul.products li.product { margin: 0 !important; }

/* =====================
   MOBILE
===================== */
@media (max-width: 768px) {
  .header-inner { height: 60px; }
  .main-nav { display: none; }
  .hamburger { display: flex; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  .hero-btns { justify-content: center; }
  .hero-image { order: -1; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =====================
   MOBILE MENU DRAWER
===================== */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1099;
}
.mobile-menu-overlay.active { display: block; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: #fff;
  z-index: 1100;
  transition: right 0.3s ease;
  padding: 0;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}

.mobile-menu.active { right: 0; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  p