@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --color-bg: #ffffff;
  --color-text: #333333;
  --color-accent: #b59a7d;
  --color-subtle: #777777;
  --color-border: #e0e0e0;
  --transition-smooth: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* PRELOADER */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
}

.preloader-logo {
  width: 180px;
  height: auto;
  margin-bottom: 30px;
  animation: preloaderPulse 2s infinite ease-in-out;
  display: block;
}

.loader-bar {
  height: 1px;
  width: 100%;
  background: rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}

.loader-bar::after {
  content: '';
  position: absolute;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  animation: loaderProgress 2s infinite ease-in-out;
}

@keyframes preloaderPulse {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes loaderProgress {
  0% { left: -100%; }
  100% { left: 100%; }
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* overflow: hidden removed to allow vertical scroll on other pages */
}

/* Specific for horizontal pages */
.horizontal-page {
  overflow: hidden;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TOP BAR */
.top-bar {
  background: #111;
  color: #fff;
  padding: 8px 0;
  font-size: 11px;
  letter-spacing: 1px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1100;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: #fff;
  text-decoration: none;
  margin-right: 20px;
  transition: opacity 0.3s;
}

.top-bar a:hover {
  opacity: 0.7;
}

.top-bar .social-links a {
  margin-right: 0;
  margin-left: 15px;
  font-size: 12px;
}

.contact-info i {
  margin-right: 5px;
  color: #fff;
}

/* HEADER */
header {
  background: transparent;
  padding: 30px 0 0;
  z-index: 2000; /* Higher than frame */
  position: fixed;
  top: 31px;
  width: 100%;
  transition: var(--transition-smooth);
}

/* SCROLLED STATE (Overrides) */
header.scrolled, header.header-solid {
  top: 0;
  background: #fff;
  padding: 15px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  border-bottom: 1px solid var(--color-border);
}

header.header-solid {
  position: fixed; /* Keep it fixed at the top */
}

header.scrolled .user-link a, header.header-solid .user-link a {
  color: var(--color-text);
}

.nav-bar a {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

header.scrolled .nav-bar a, header.header-solid .nav-bar a {
  color: var(--color-text);
}

.nav-bar ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 35px;
}

.user-link i {
  font-size: 14px;
}


.nav-bar a.active, .nav-bar a:hover {
  color: var(--color-accent) !important;
}

.main-footer .logo-img {
  height: 100px;
}

.main-footer .logo-frame {
  border: none;
  padding: 0;
  margin-bottom: 20px;
}

.user-actions a:hover {
  opacity: 0.7;
}

/* HORIZONTAL SCROLL BASE */
.horizontal-scroll-container {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.horizontal-scroll-wrapper {
  display: flex;
  height: 100vh;
  width: max-content;
  will-change: transform;
}

.section-panel {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 60px;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 120%; /* Wide for parallax */
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-logo {
  max-width: 450px;
  width: 80%;
  height: auto;
  margin: 0 auto 40px;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.3));
}

.hero h1 {
  font-size: 6rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 40px;
}

.hero-subtitle em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  text-transform: capitalize;
  letter-spacing: 2px;
  font-size: 1.4rem;
  padding-left: 5px;
}

.btn-outline {
  display: inline-block;
  padding: 15px 40px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 11px;
  letter-spacing: 3px;
  backdrop-filter: blur(5px);
}

.btn-outline:hover {
  background: #fff;
  color: #000;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%; /* Extra height for parallax */
  background-size: cover;
  background-position: center;
  z-index: 1;
  will-change: transform;
}

.hero-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
}

/* CATEGORIAS DESTACADAS */
.featured-categories {
  padding: 80px 0;
  background: #fff;
}

.featured-categories .container {
  max-width: 1600px; /* Wider container to take advantage of space */
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.category-card {
  position: relative;
  height: 650px; /* Taller cards */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.category-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover .category-img {
  transform: scale(1.1);
}

.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
  z-index: 1;
  transition: var(--transition-smooth);
}

.category-card:hover .category-overlay {
  background: rgba(0,0,0,0.4);
}

.category-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 320px;
}

.category-content h3 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.category-content p {
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 30px;
  line-height: 1.6;
}

.category-card:hover .category-content p {
  opacity: 1;
  transform: translateY(0);
}

.category-content .btn-outline {
  opacity: 0.8;
  transform: translateY(10px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover .category-content .btn-outline {
  opacity: 1;
  transform: translateY(0);
}

/* BRANDS SECTION */
.brands-section {
  padding: 60px 0;
  background: #fdfdfd;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.brands-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  opacity: 0.6;
}

.brand-logo {
  max-width: 150px;
  filter: grayscale(100%);
  transition: var(--transition-smooth);
}

.brand-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* PAGE HEADER (TIENDA) */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  background: #f9f9f9;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

/* SHOP LAYOUT */
.shop-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 50px;
  padding: 80px 0;
}

.shop-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 10px;
}

.filter-group {
  margin-bottom: 40px;
}

.filter-group ul li {
  margin-bottom: 12px;
}

.filter-group ul li a {
  font-size: 0.9rem;
  color: var(--color-subtle);
}

.filter-group ul li a.active {
  color: var(--color-text);
  font-weight: 600;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  font-size: 2.5rem;
}

.section-header .subtitle {
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 10px;
  display: block;
  margin-bottom: 10px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.product-card {
  text-align: center;
}

.product-img {
  aspect-ratio: 1/1;
  overflow: hidden;
  margin-bottom: 25px;
  background: #f9f9f9;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-img img {
  transform: scale(1.08);
}

.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.product-info .brand {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-subtle);
  margin-bottom: 20px;
}

.buy-btn {
  display: inline-block;
  padding: 12px 30px;
  border: 1px solid var(--color-border);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--color-subtle);
}

.buy-btn:hover {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  filter: blur(5px);
  transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .header-main-row {
    flex-direction: column;
    gap: 20px;
  }
  .hero h1 {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  .nav-bar {
    display: none;
  }
  .hero h1 {
    font-size: 3rem;
  }
}

/* FOOTER PANEL */
.footer-panel {
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-panel .main-footer {
  margin-top: 0;
  padding: 0;
  width: 100%;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 30px;
  color: var(--color-accent);
}

.footer-col p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 15px;
}

.footer-col.about p {
  margin: 20px 0;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-col ul li a:hover {
  opacity: 1;
  padding-left: 5px;
}

.newsletter-form {
  display: flex;
  margin-top: 20px;
}

.newsletter-form input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px 20px;
  color: #fff;
  flex: 1;
  outline: none;
}

.newsletter-form button {
  background: #fff;
  color: #000;
  border: none;
  padding: 0 25px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.newsletter-form button:hover {
  background: var(--color-accent);
  color: #fff;
}

.footer-bottom {
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  opacity: 0.5;
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
  .categories-grid {
    grid-template-columns: 1fr;
  }
  .shop-layout {
    grid-template-columns: 1fr;
  }
}
/* INTRO SECTION */
.intro-section {
  padding: 80px 0;
  text-align: center;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-frame-wrapper {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.ornate-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: 60px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.intro-icon {
  width: 120px;
  height: auto;
  margin-top: 35px;
  opacity: 0.95;
}

.intro-content h2 {
  font-size: 2.5rem;
  margin-bottom: 25px;
  line-height: 1.2;
}

.intro-content p {
  font-size: 1.2rem;
  color: var(--color-subtle);
  line-height: 1.8;
}

/* PHILOSOPHY SECTION */
.philosophy-section {
  padding: 120px 0;
  background: #fdfbf7;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}

.philosophy-text {
  position: relative;
}

.philosophy-logo {
  position: absolute;
  top: -50px;
  left: -80px;
  width: 500px;
  height: auto;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.philosophy-text h2, .philosophy-description, .features-list, .subtitle {
  position: relative;
  z-index: 1;
}

.philosophy-text h2 {
  font-size: 3rem;
  margin-bottom: 25px;
  line-height: 1.2;
}

.philosophy-description {
  margin-bottom: 40px;
  font-size: 1.15rem;
  color: var(--color-subtle);
  line-height: 1.8;
  max-width: 540px;
}

.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two columns for features */
  gap: 20px 40px;
}

.features-list li {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  font-weight: 500;
}

.features-list i {
  color: var(--color-accent);
  font-size: 0.9rem;
}

.philosophy-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 40px 80px rgba(0,0,0,0.08);
}

/* BLOG PREVIEW */
.blog-preview-section {
  padding: 120px 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.blog-card {
  background: #fff;
}

.blog-img {
  height: 400px;
  background-size: cover;
  background-position: center;
  margin-bottom: 25px;
  transition: var(--transition-smooth);
}

.blog-card:hover .blog-img {
  opacity: 0.9;
}

.blog-info .date {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  display: block;
  margin-bottom: 10px;
}

.blog-info h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.read-more {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 5px;
}

@media (max-width: 768px) {
  .philosophy-grid, .blog-grid {
    grid-template-columns: 1fr;
  }
  .intro-content h2 {
    font-size: 2.5rem;
  }
}

/* BRANDS SECTION REDESIGN */
.brands-section {
  background: #fff;
}

.brands-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
}

.brands-image {
  flex: 1.2;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.brands-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.1);
}

.brands-content {
  flex: 1;
  padding: 80px;
  display: flex;
  align-items: center;
  background: #fff;
}

.brands-content h2 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.brands-description {
  font-size: 1.1rem;
  color: var(--color-subtle);
  margin-bottom: 50px;
  line-height: 1.8;
  max-width: 500px;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  align-items: center;
}

.brand-item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo {
  max-width: 140px;
  max-height: 60px;
  filter: grayscale(1);
  opacity: 0.5;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.05);
}

@media (max-width: 1200px) {
  .brands-content {
    padding: 40px;
  }
  .brands-content h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .brands-wrapper {
    flex-direction: column;
  }
  .brands-image {
    height: 300px;
    flex: none;
  }
  .brands-content {
    flex: none;
    padding: 60px 20px;
  }
  .brands-grid {
    gap: 40px;
  }
}

/* --- TIENDA REDESIGN (ROLLERMARKET INSPIRED) --- */

.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  margin-top: 60px;
}

.shop-sidebar {
  padding-right: 30px;
  border-right: 1px solid var(--color-border);
}

.filter-group {
  margin-bottom: 40px;
}

.filter-group h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 10px;
  display: inline-block;
}

.filter-group ul {
  list-style: none;
}

.filter-group ul li {
  margin-bottom: 12px;
}

.filter-btn {
  text-decoration: none;
  color: var(--color-subtle);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  display: block;
}

.filter-btn:hover, .filter-btn.active {
  color: var(--color-accent);
  padding-left: 5px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--color-subtle);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-group label:hover {
  color: var(--color-text);
}

.brand-checkbox {
  accent-color: var(--color-accent);
  width: 16px;
  height: 16px;
}

/* PRODUCT CARDS */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product-card {
  background: #fff;
  border: 1px solid #ebebeb;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}

.product-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f5f5f5;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

/* Broken image fallback */
.product-img img[src=""],
.product-img img:not([src]) {
  visibility: hidden;
}

.product-card:hover .product-img img {
  transform: scale(1.06);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255,255,255,0.9);
  padding: 5px 12px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  z-index: 2;
}

.product-info {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  margin-bottom: 6px;
  font-weight: 600;
}

.product-info h3 {
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--color-text);
  line-height: 1.4;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
  gap: 10px;
}

.price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.buy-btn {
  background: var(--color-text);
  color: #fff;
  text-decoration: none;
  padding: 9px 16px;
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 600;
  transition: background 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.product-card:hover .buy-btn {
  background: var(--color-accent);
}

/* LOADING & UTILS */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 0;
  width: 100%;
  grid-column: 1 / -1;
}

.loader {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-border);
  border-bottom-color: var(--color-accent);
  border-radius: 50%;
  display: inline-block;
  animation: rotation 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 100px 0;
  font-size: 1.2rem;
  color: var(--color-subtle);
  font-style: italic;
}

@media (max-width: 992px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .shop-sidebar {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 40px;
  }
  .filter-group {
    display: inline-block;
    vertical-align: top;
    margin-right: 40px;
  }
}

/* --- PRODUCT DETAIL PAGE (REPLICATING ROLLERMARKET) --- */

.product-page {
  padding-top: 150px;
  padding-bottom: 100px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: 150px;
}

.main-image-container {
  background: #f9f9f9;
  border: 1px solid #eee;
  margin-bottom: 20px;
  position: relative;
}

.main-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.zoom-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.8);
  padding: 8px 15px;
  border-radius: 30px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  pointer-events: none;
}

/* CONFIGURATOR */
.breadcrumb {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-subtle);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--color-accent);
}

.product-configurator h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  line-height: 1.2;
}

.product-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.delivery-badge, .stock-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.delivery-badge { color: #27ae60; }
.stock-badge { color: var(--color-subtle); }

.config-step {
  margin-bottom: 50px;
}

.config-step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text);
  border-left: 3px solid var(--color-accent);
  padding-left: 15px;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
}

.color-btn {
  border: 1px solid #eee;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.color-btn:hover, .color-btn.active {
  border-color: var(--color-accent);
  background: #fafafa;
}

.color-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}

.color-btn span {
  font-size: 12px;
  font-weight: 500;
}

.measure-help {
  font-size: 12px;
  color: var(--color-subtle);
  margin-bottom: 20px;
}

.measure-inputs {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.input-field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  background: #fff;
}

.input-wrapper input {
  width: 80px;
  padding: 12px;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.input-wrapper span {
  padding-right: 15px;
  font-size: 12px;
  color: var(--color-subtle);
}

.how-to-measure {
  font-size: 11px;
  color: var(--color-accent);
  text-decoration: underline;
  font-weight: 600;
}

.radio-options {
  display: flex;
  gap: 20px;
}

.radio-card {
  flex: 1;
  cursor: pointer;
}

.radio-card input {
  display: none;
}

.radio-content {
  border: 1px solid #eee;
  padding: 20px;
  text-align: center;
  transition: var(--transition-smooth);
}

.radio-card input:checked + .radio-content {
  border-color: var(--color-accent);
  background: #fafafa;
}

.radio-content span {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.radio-content small {
  font-size: 11px;
  color: var(--color-subtle);
}

/* SUMMARY */
.config-summary {
  background: #fdfaf7;
  border: 1px solid #f3ebe1;
  padding: 40px;
  margin-top: 60px;
}

.price-block {
  margin-bottom: 30px;
}

.final-price {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 5px;
}

.installments {
  font-size: 14px;
  color: var(--color-subtle);
}

.installments strong {
  color: var(--color-text);
}

.consultar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #25d366;
  color: #fff;
  padding: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
}

.consultar-btn:hover {
  background: #128c7e;
  transform: translateY(-5px);
}

.consultar-note {
  font-size: 12px;
  color: var(--color-subtle);
  margin-top: 15px;
  text-align: center;
}

@media (max-width: 992px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .product-gallery {
    position: static;
  }
}

/* =============================================
   HEADER LOGO (tienda & producto pages)
   ============================================= */
.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* =============================================
   SHOP TOOLBAR (search + sort + count)
   ============================================= */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f9f9f9;
  border: 1px solid var(--color-border);
  padding: 10px 18px;
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  transition: border-color 0.3s;
}

.search-bar:focus-within {
  border-color: var(--color-accent);
  background: #fff;
}

.search-bar i {
  color: var(--color-subtle);
  font-size: 14px;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: var(--color-text);
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--color-subtle);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.results-count {
  font-size: 12px;
  color: var(--color-subtle);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.sort-select {
  border: 1px solid var(--color-border);
  background: #fff;
  padding: 10px 15px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: var(--color-text);
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s;
}

.sort-select:focus {
  border-color: var(--color-accent);
}

/* =============================================
   PRICE CONSULTAR style
   ============================================= */
.price-consultar {
  font-size: 0.95rem !important;
  color: var(--color-accent) !important;
  font-style: italic;
  font-weight: 600 !important;
}

/* =============================================
   NO RESULTS with icon
   ============================================= */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: var(--color-subtle);
}

.no-results i {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
  opacity: 0.3;
}

.no-results p {
  font-size: 1.1rem;
  font-style: italic;
}

/* =============================================
   PRODUCT DETAIL - Category tag & brand strip
   ============================================= */
.product-category-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.product-brand-strip {
  margin-top: 15px;
}

.product-brand-badge {
  display: inline-block;
  background: #f5f5f5;
  border: 1px solid var(--color-border);
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-subtle);
}

/* Step number pill */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
}

/* =============================================
   SIZE BUTTONS (Alfombras)
   ============================================= */
.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.size-btn {
  border: 1px solid var(--color-border);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
}

.size-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.size-btn.active {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

/* =============================================
   BREADCRUMB on product page
   ============================================= */
#product-breadcrumb {
  display: block;
  margin-bottom: 40px;
  margin-top: 0;
  padding-top: 30px;
}

/* =============================================
   MOBILE RESPONSIVE (Albert's Version)
   ============================================= */
.mobile-menu-toggle {
  display: none;
}

@media (max-width: 991px) {
  /* Prevent horizontal scroll layout */
  .horizontal-page {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .horizontal-scroll-container {
    height: auto !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .horizontal-scroll-wrapper {
    display: flex;
    flex-direction: column !important;
    height: auto !important;
    width: 100% !important;
    transform: none !important;
  }

  .section-panel {
    width: 100% !important;
    height: auto !important;
    min-height: 80vh;
    padding: 100px 0 60px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Header & Navigation */
  header {
    top: 0 !important;
    padding: 15px 0 !important;
    background: #fff !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    width: 100%;
    z-index: 2000;
  }

  .top-bar {
    display: none; /* Hide top bar on mobile for cleaner look */
  }

  .nav-bar {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: block !important;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text);
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Mobile Navigation Overlay */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-nav-overlay.active {
    transform: translateX(0);
  }

  .mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-text);
    cursor: pointer;
  }

  .mobile-nav-content {
    text-align: center;
    width: 80%;
  }

  .mobile-nav-logo {
    width: 150px;
    margin-bottom: 50px;
  }

  .mobile-nav-links li {
    margin-bottom: 25px;
  }

  .mobile-nav-links a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 2px;
    font-family: 'Playfair Display', serif;
  }

  .mobile-nav-footer {
    margin-top: 50px;
    border-top: 1px solid var(--color-border);
    padding-top: 30px;
  }

  /* Hero Mobile */
  .hero-content {
    padding: 0 20px;
    margin-top: 40px; /* Give space for fixed header */
  }

  .hero-logo {
    max-width: 250px;
    width: 90%;
    margin-bottom: 20px !important;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    letter-spacing: 3px;
  }

  .hero-image {
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
  }

  /* Intro Section Mobile */
  .intro-frame-wrapper {
    height: auto;
    width: 90%;
    padding: 50px 20px;
    border: 1px solid var(--color-accent); /* Frame fallback for mobile */
    background: #fff;
    margin-top: 20px;
  }

  .ornate-frame {
    display: none; /* Hide complex frame on mobile for better readability */
  }

  /* --- TIENDA MOBILE FIXES --- */
  .shop-layout {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .shop-sidebar {
    padding-right: 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 30px;
  }

  .filter-group h3 {
    font-size: 1.2rem !important;
    margin-bottom: 15px !important;
  }

  .products-grid {
    grid-template-columns: 1fr !important; /* 1 column for mobile clarity */
    gap: 25px !important;
  }

  .product-card {
    max-width: 400px;
    margin: 0 auto;
  }

  .product-img {
    aspect-ratio: 1/1 !important;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 15px !important;
  }

  .search-bar {
    max-width: 100% !important;
  }

  .toolbar-right {
    justify-content: space-between;
    width: 100%;
  }

  /* Brands Section Mobile */
  .brands-wrapper {
    flex-direction: column;
    height: auto;
  }

  .brands-image {
    height: 250px;
    width: 100% !important;
  }

  .brands-content {
    padding: 60px 20px;
    width: 100%;
  }

  .brands-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    opacity: 1;
  }

  .brands-description {
    max-width: 100%;
    font-size: 1rem;
  }

  /* Categories Mobile */
  .featured-categories {
    padding: 60px 0;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-card {
    height: 350px;
    padding: 20px;
  }

  .category-content h3 {
    font-size: 1.8rem;
  }

  .category-content p {
    opacity: 1;
    transform: none;
    font-size: 0.85rem;
  }

  .category-content .btn-outline {
    opacity: 1;
    transform: none;
  }

  /* Philosophy Mobile */
  .philosophy-section {
    padding: 60px 0;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .philosophy-image {
    order: -1;
  }

  .philosophy-text h2 {
    font-size: 2.2rem;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  /* Blog Mobile */
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .blog-img {
    height: 250px !important;
  }

  /* Contact Page Mobile */
  main .container[style*="padding: 100px 0"] div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .contact-info-card, .contact-form {
    width: 100% !important;
  }

  /* Footer Mobile */
  .footer-panel {
    height: auto;
    padding: 60px 0;
  }

  .footer-top {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 40px;
  }

  .footer-col.about .logo-img {
    margin: 0 auto;
  }

  .footer-col.newsletter .newsletter-form {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    padding: 20px 0;
  }
}


/* --- FINAL FIX FOR MOBILE SCROLL --- */
@media (max-width: 768px) {
  .horizontal-page { overflow-y: auto !important; overflow-x: hidden !important; }
  .horizontal-scroll-container { height: auto !important; overflow: visible !important; }
  .horizontal-scroll-wrapper { display: flex !important; flex-direction: column !important; transform: none !important; height: auto !important; width: 100% !important; }
  .section-panel { height: auto !important; min-height: 80vh !important; width: 100% !important; padding: 100px 0 60px !important; display: flex !important; align-items: center !important; }
  header { top: 0 !important; background: #fff !important; position: fixed !important; box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important; }
  .nav-bar { display: none !important; }
  .mobile-menu-toggle { display: block !important; }
  .hero-image { transform: none !important; width: 100% !important; height: 100% !important; }
}
