/* ============================================
   Maestro Carnicero — Style Sheet
   ============================================ */

/* --- Variables --- */
:root {
  --color-fons: #faf3e0;
  --color-fosc: #1a1a1a;
  --color-vermell: #c0392b;
  --color-or: #d4a017;
  --color-text: #4a4a4a;
  --color-titols: #1a1a1a;
  --color-blanc: #ffffff;
  --color-gris-clar: #f5f0e3;
  --font-titols: 'Playfair Display', Georgia, serif;
  --font-cos: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.3s ease;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 35px rgba(0,0,0,0.15);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-cos);
  color: var(--color-text);
  background-color: var(--color-fons);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titols);
  color: var(--color-titols);
  font-weight: 700;
  line-height: 1.25;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- NAV --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--color-fosc);
  transition: box-shadow var(--transition);
  padding: 0;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo img {
  height: 45px;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-right a {
  color: var(--color-blanc);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.nav-right a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-or);
  transition: width var(--transition);
}

.nav-right a:hover {
  color: var(--color-or);
}

.nav-right a:hover::after {
  width: 100%;
}

.nav-right a.active {
  color: var(--color-or);
}

/* Mobile hamburguesa */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-blanc);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- HERO --- */
.hero {
  background: var(--color-fosc);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(212,160,23,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 4rem;
  color: var(--color-blanc);
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

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

.hero-content p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
  line-height: 1.8;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--color-vermell);
  color: var(--color-blanc);
  font-family: var(--font-cos);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.hero-cta:hover {
  background: var(--color-or);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212,160,23,0.3);
}

/* Hero petita (pàgines internes) */
.hero-small {
  background: var(--color-fosc);
  padding: 8rem 1.5rem 4rem;
  text-align: center;
}

.hero-small h1 {
  font-size: 2.5rem;
  color: var(--color-blanc);
}

.hero-small p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-top: 0.75rem;
}

/* --- SECCIONS --- */
.section {
  padding: 5rem 1.5rem;
}

.section-cream {
  background: var(--color-fons);
}

.section-dark {
  background: var(--color-fosc);
}

.section-dark h2,
.section-dark .section-title {
  color: var(--color-blanc);
}

.section-red {
  background: var(--color-vermell);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto 3rem;
  color: var(--color-text);
}

.section-dark .section-subtitle {
  color: rgba(255,255,255,0.7);
}

/* --- HISTORIA --- */
.historia-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.historia-content p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 2rem;
}

.historia-cita {
  font-family: var(--font-titols);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-vermell);
  border-left: 4px solid var(--color-or);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: rgba(212,160,23,0.05);
  border-radius: 0 8px 8px 0;
}

/* --- QUALITAT (targetes fosques) --- */
.qualitat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.qualitat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
}

.qualitat-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--color-or);
  transform: translateY(-4px);
}

.qualitat-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  display: block;
}

.qualitat-card h3 {
  font-size: 1.3rem;
  color: var(--color-or);
  margin-bottom: 1rem;
}

.qualitat-card p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- PRODUCTES CARDS --- */
.productes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.product-card {
  background: var(--color-blanc);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  display: block;
}

.product-card h3 {
  font-size: 1.25rem;
  color: var(--color-vermell);
  margin-bottom: 0.75rem;
}

.product-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.product-link {
  color: var(--color-or);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition);
}

.product-link:hover {
  color: var(--color-vermell);
}

/* --- BOTIGUES --- */
.botigues-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.botiga-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
}

.botiga-card:hover {
  border-color: var(--color-or);
  transform: translateY(-4px);
}

.botiga-card h3 {
  font-size: 1.3rem;
  color: var(--color-or);
  margin-bottom: 1rem;
}

.botiga-card .direccio {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.botiga-card .horari {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.botiga-card .horari span {
  color: var(--color-or);
}

/* --- CTA FINAL --- */
.cta-section {
  text-align: center;
  padding: 5rem 1.5rem;
}

.cta-section h2 {
  color: var(--color-blanc);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.cta-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--color-blanc);
  color: var(--color-vermell);
  font-family: var(--font-cos);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.cta-btn:hover {
  background: var(--color-or);
  color: var(--color-blanc);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

/* --- CONTACT FORM --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.contact-form {
  background: var(--color-blanc);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-titols);
  margin-bottom: 0.4rem;
}

.form-group label .required {
  color: var(--color-vermell);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-family: var(--font-cos);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-blanc);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-or);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.1);
}

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

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--color-vermell);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  cursor: pointer;
  accent-color: var(--color-vermell);
}

.form-checkbox label {
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
}

.form-checkbox label a {
  color: var(--color-vermell);
  text-decoration: underline;
}

.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--color-vermell);
  color: var(--color-blanc);
  font-family: var(--font-cos);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.form-submit:hover {
  background: var(--color-or);
  transform: translateY(-2px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-error {
  color: var(--color-vermell);
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: none;
}

.form-error.show {
  display: block;
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.show {
  display: block;
}

.form-success .check-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.form-success h3 {
  color: var(--color-vermell);
  margin-bottom: 0.5rem;
}

/* Contact info */
.contact-info {
  background: var(--color-fosc);
  padding: 2.5rem;
  border-radius: 12px;
}

.contact-info h3 {
  color: var(--color-or);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.contact-info-item .icon {
  font-size: 1.3rem;
  min-width: 1.5rem;
}

.contact-info-item .text {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
}

.contact-info-item .text a {
  color: var(--color-or);
}

.contact-info-item .text a:hover {
  text-decoration: underline;
}

/* --- LEGAL PAGE --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.legal-content section {
  margin-bottom: 3rem;
}

.legal-content h2 {
  font-size: 1.75rem;
  color: var(--color-vermell);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-or);
}

.legal-content h3 {
  font-size: 1.15rem;
  color: var(--color-titols);
  margin: 1.5rem 0 0.75rem;
}

.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.legal-content ul {
  margin: 0.5rem 0 1rem 1.5rem;
  list-style: disc;
}

.legal-content ul li {
  margin-bottom: 0.3rem;
  line-height: 1.7;
}

/* --- FOOTER --- */
footer {
  background: var(--color-fosc);
  color: rgba(255,255,255,0.7);
  padding: 4rem 1.5rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  color: var(--color-or);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-titols);
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--color-or);
}

.footer-logo img {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.3rem;
}

.footer-bottom a {
  color: var(--color-or);
}

/* --- COOKIE BANNER --- */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-fosc);
  padding: 1.5rem 2rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  display: none;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-consent.show {
  display: block;
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 250px;
}

.cookie-text p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cookie-text a {
  color: var(--color-or);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-family: var(--font-cos);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.cookie-btn-accept {
  background: var(--color-vermell);
  color: var(--color-blanc);
}

.cookie-btn-accept:hover {
  background: var(--color-or);
}

.cookie-btn-reject {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
}

.cookie-btn-reject:hover {
  border-color: var(--color-or);
  color: var(--color-or);
}

/* --- SCROLL TOP --- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--color-vermell);
  color: var(--color-blanc);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(192,57,43,0.3);
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--color-or);
  transform: translateY(-3px);
}

/* --- MAP PLACEHOLDER --- */
.map-placeholder {
  max-width: 900px;
  margin: 2rem auto;
  background: var(--color-gris-clar);
  border-radius: 12px;
  padding: 4rem 2rem;
  text-align: center;
  border: 2px dashed #ccc;
}

.map-placeholder p {
  color: var(--color-text);
  font-size: 1rem;
}

/* --- ANIMACIONS SCROLL --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
  .nav-right {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-fosc);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  }

  .nav-right.open {
    right: 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

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

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

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

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

  .hero-small h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  nav .container {
    height: 60px;
  }

  .nav-logo img {
    height: 35px;
  }

  .hero {
    min-height: 90vh;
    padding: 5rem 1.25rem 3rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .historia-cita {
    font-size: 1.15rem;
    padding: 1rem 1.25rem;
  }

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

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

  .product-card {
    padding: 1.5rem 1rem;
  }

  .cta-section h2 {
    font-size: 1.75rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .hero-small {
    padding: 6rem 1.25rem 3rem;
  }

  .hero-small h1 {
    font-size: 1.75rem;
  }

  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-buttons {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }

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

  .scroll-top {
    bottom: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* Mobile petit */
@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-cta {
    padding: 0.85rem 1.75rem;
    font-size: 0.85rem;
  }

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

  .section-title {
    font-size: 1.5rem;
  }

  .botiga-card {
    padding: 1.75rem 1.25rem;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }
}
