/* ============================================
   FERRETERÍA GIMÉNEZ — Styles
   Palette: Terracotta + Sand
   Fonts: Playfair Display + Lora
   ============================================ */

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

:root {
  --terracotta: #B85C38;
  --terracotta-dark: #9A4B2C;
  --terracotta-light: #D4845E;
  --sand: #E8D5C0;
  --sand-light: #F2E8DA;
  --sand-dark: #C4A882;
  --cream: #FAF6F0;
  --cream-dark: #F0E8DC;
  --charcoal: #2C2420;
  --charcoal-light: #4A3F38;
  --warm-gray: #7A6E66;
  --white: #FFFFFF;
  --nav-width: 260px;
  --nav-collapsed: 0px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Lora', Georgia, serif;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--charcoal);
}

.serif-italic {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--terracotta);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   SIDE NAVIGATION
   ============================================ */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--charcoal);
  color: var(--sand-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 24px;
  z-index: 1000;
  transition: transform var(--transition);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  color: var(--terracotta-light);
  flex-shrink: 0;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.brand-sub {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.75rem;
  color: var(--sand-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 10px 16px;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9rem;
  color: var(--sand-dark);
  border-left: 2px solid transparent;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sand-light);
  border-left-color: var(--terracotta);
  background: rgba(184, 92, 56, 0.08);
}

.nav-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(196, 168, 130, 0.15);
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--terracotta-light);
  transition: color var(--transition);
}

.nav-phone:hover {
  color: var(--terracotta);
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
.menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  background: var(--charcoal);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sand-light);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 36, 32, 0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition);
}

.nav-overlay.visible {
  opacity: 1;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: var(--nav-width);
  transition: margin-left var(--transition);
}

.section {
  padding: 100px 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.section-header {
  margin-bottom: 60px;
}

.section-header.center {
  text-align: center;
}

.section-label {
  display: inline-block;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--terracotta);
  margin-bottom: 16px;
  position: relative;
  padding-left: 32px;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--terracotta);
}

.section-header.center .section-label {
  padding-left: 0;
}

.section-header.center .section-label::before {
  display: none;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--warm-gray);
  max-width: 560px;
  line-height: 1.8;
}

.section-header.center .section-desc {
  margin: 0 auto;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  padding: 0;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(184, 92, 56, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(196, 168, 130, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px 80px 48px;
  position: relative;
  z-index: 1;
}

.hero-accent {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.accent-line {
  width: 48px;
  height: 2px;
  background: var(--terracotta);
  flex-shrink: 0;
}

.accent-label {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.85rem;
  color: var(--warm-gray);
  letter-spacing: 0.06em;
  font-style: italic;
}

.hero-title {
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 28px;
  color: var(--charcoal);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--warm-gray);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  align-items: center;
}

.stat-number {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--terracotta);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--sand-dark);
  opacity: 0.5;
}

.hero-image {
  position: relative;
  height: 100%;
  min-height: 600px;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--cream), transparent);
  pointer-events: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 92, 56, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--sand-dark);
}

.btn-ghost:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  background: var(--cream);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-images {
  position: relative;
}

.about-img-main {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(44, 36, 32, 0.12);
}

.about-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-img-secondary {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 55%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(44, 36, 32, 0.15);
  border: 4px solid var(--cream);
}

.about-img-secondary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  top: -20px;
  right: 40px;
  background: var(--terracotta);
  color: var(--white);
  padding: 20px 24px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(184, 92, 56, 0.3);
}

.about-badge svg {
  opacity: 0.9;
}

.about-badge span {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.about-text .section-label {
  margin-bottom: 16px;
}

.about-text .section-title {
  margin-bottom: 24px;
}

.about-text p {
  color: var(--warm-gray);
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.about-features {
  list-style: none;
  margin-top: 32px;
  display: grid;
  gap: 14px;
}

.about-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--charcoal-light);
}

.about-features li svg {
  color: var(--terracotta);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  background: var(--sand-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px 32px;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 56px rgba(44, 36, 32, 0.1);
  border-color: var(--terracotta-light);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin-bottom: 24px;
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.92rem;
  color: var(--warm-gray);
  line-height: 1.7;
}

/* ============================================
   PRODUCTS
   ============================================ */
.products {
  background: var(--cream);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(44, 36, 32, 0.1);
  border-color: var(--sand-dark);
}

.product-img {
  overflow: hidden;
  aspect-ratio: 4/3;
}

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

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

.product-info {
  padding: 24px;
}

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.product-info p {
  font-size: 0.88rem;
  color: var(--warm-gray);
  line-height: 1.6;
}

.products-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.products-cta p {
  font-size: 1.05rem;
  color: var(--warm-gray);
}

/* ============================================
   GALLERY
   ============================================ */
.gallery {
  background: var(--charcoal);
  padding: 100px 0;
}

.gallery .section-label {
  color: var(--terracotta-light);
}

.gallery .section-label::before {
  background: var(--terracotta-light);
}

.gallery .section-title {
  color: var(--cream);
}

.gallery .section-title .serif-italic {
  color: var(--terracotta-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 36, 32, 0.3), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover::after {
  opacity: 1;
}

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

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

.gallery-item.large {
  grid-column: span 7;
  grid-row: span 1;
  aspect-ratio: 7/5;
}

.gallery-item.tall {
  grid-column: span 5;
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery-item:not(.large):not(.tall) {
  aspect-ratio: 4/3;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  background: var(--sand-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-desc {
  font-size: 1.05rem;
  color: var(--warm-gray);
  margin-bottom: 40px;
  line-height: 1.8;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(44, 36, 32, 0.06);
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--warm-gray);
  margin-bottom: 4px;
}

.contact-value {
  display: block;
  font-size: 0.95rem;
  color: var(--charcoal);
  line-height: 1.6;
}

.contact-value a {
  color: var(--terracotta);
  transition: color var(--transition);
}

.contact-value a:hover {
  color: var(--terracotta-dark);
  text-decoration: underline;
}

.contact-form-wrapper {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 16px 48px rgba(44, 36, 32, 0.08);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--charcoal-light);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  padding: 14px 16px;
  border: 1.5px solid var(--sand);
  border-radius: 8px;
  background: var(--cream);
  color: var(--charcoal);
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--terracotta);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--sand-dark);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  border-radius: 8px;
  color: #2E7D32;
  font-size: 0.92rem;
}

.form-success.visible {
  display: flex;
}

.form-success svg {
  flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--charcoal);
  color: var(--sand-dark);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-logo svg {
  color: var(--terracotta-light);
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--sand-dark);
  max-width: 300px;
}

.footer-links h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links li a {
  font-size: 0.88rem;
  color: var(--sand-dark);
  transition: color var(--transition);
}

.footer-links li a:hover {
  color: var(--terracotta-light);
}

.footer-bottom {
  border-top: 1px solid rgba(196, 168, 130, 0.15);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--warm-gray);
}

.footer-legal {
  font-size: 0.82rem;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 100px 40px 60px;
  }

  .hero-image {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 80px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.large {
    grid-column: span 12;
  }

  .gallery-item.tall {
    grid-column: span 6;
    grid-row: span 1;
    aspect-ratio: 4/3;
  }

  .gallery-item:not(.large):not(.tall) {
    grid-column: span 6;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-width: 0px;
  }

  .side-nav {
    transform: translateX(-100%);
    width: 280px;
    padding: 80px 24px 32px;
  }

  .side-nav.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
  }

  .nav-overlay {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .section {
    padding: 80px 0;
  }

  .hero-content {
    padding: 100px 24px 60px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

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

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item.large,
  .gallery-item.tall,
  .gallery-item:not(.large):not(.tall) {
    grid-column: span 1;
    aspect-ratio: 4/3;
  }

  .about-img-secondary {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    margin-top: -20px;
    border: none;
    box-shadow: 0 16px 48px rgba(44, 36, 32, 0.15);
  }

  .about-badge {
    top: 16px;
    right: 16px;
  }

  .contact-form-wrapper {
    padding: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }
}
