/* =========================================================
   SCALA
   JOYERÍA CONTEMPORÁNEA
   Sistema visual principal
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

:root {
  --white: #faf8f5;
  --white-pure: #ffffff;

  --cream: #f3ebe2;
  --nude: #e7d4c0;
  --nude-light: #efe2d4;

  --chocolate: #3a2922;
  --chocolate-light: #65483a;
  --chocolate-dark: #211915;

  --gold: #c6a164;
  --gold-light: #dec79e;

  --muted: #8b776b;

  --border: rgba(58, 41, 34, 0.13);

  --shadow:
    0 20px 60px rgba(58, 41, 34, 0.12);
}


/* =========================================================
   RESET
========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--chocolate);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

img {
  display: block;
  width: 100%;
}


/* =========================================================
   TOP BAR
========================================================= */

.topbar {
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--chocolate);
  color: #ffffff;

  font-size: 10px;
  font-weight: 400;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}


/* =========================================================
   HEADER
========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 100;

  height: 84px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  padding: 0 42px;

  background: rgba(250, 248, 245, 0.96);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border-bottom: 1px solid var(--border);
}


/* =========================================================
   NAVIGATION
========================================================= */

.nav {
  display: flex;
  align-items: center;

  gap: 24px;

  font-size: 10px;

  letter-spacing: 0.07em;

  text-transform: uppercase;
}

.nav a {
  position: relative;

  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.nav a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -7px;

  width: 0;
  height: 1px;

  background: var(--gold);

  transition: width 0.25s ease;
}

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

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


/* =========================================================
   LOGO
========================================================= */

.logo {
  display: block;

  text-align: center;

  color: var(--chocolate);

  font-family: "Cormorant Garamond", serif;

  font-size: 45px;
  font-weight: 500;

  line-height: 0.8;

  letter-spacing: 0.19em;

  transition: color 0.25s ease;
}

.logo:hover {
  color: var(--chocolate-light);
}

.logo small {
  display: block;

  margin-top: 9px;

  color: var(--gold);

  font-family: "Inter", sans-serif;

  font-size: 7px;
  font-weight: 400;

  line-height: 1;

  letter-spacing: 0.32em;

  text-transform: uppercase;
}


/* =========================================================
   HEADER ACTIONS
========================================================= */

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 18px;
}

.icon-btn {
  position: relative;

  width: 26px;
  height: 26px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;

  background: transparent;

  color: var(--chocolate);

  font-size: 18px;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.icon-btn:hover {
  color: var(--gold);

  transform: translateY(-1px);
}


/* =========================================================
   CART BADGE
========================================================= */

.badge {
  position: absolute;

  top: -7px;
  right: -9px;

  width: 17px;
  height: 17px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: var(--chocolate);

  color: #ffffff;

  font-size: 9px;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu {
  display: none;

  width: 30px;
  height: 30px;

  border: 0;

  background: transparent;

  color: var(--chocolate);

  font-size: 20px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
  display: grid;

  grid-template-columns: 44% 56%;

  min-height: 650px;

  background: var(--cream);
}

.hero-copy {
  display: flex;

  flex-direction: column;
  justify-content: center;

  padding: 80px;
}

.eyebrow {
  margin-bottom: 20px;

  color: var(--gold);

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 0.22em;

  text-transform: uppercase;
}

.hero h1 {
  max-width: 650px;

  margin-bottom: 28px;

  color: var(--chocolate-dark);

  font-family: "Cormorant Garamond", serif;

  font-size: clamp(60px, 6vw, 94px);

  font-weight: 500;

  line-height: 0.84;

  letter-spacing: -0.02em;
}

.hero p {
  max-width: 410px;

  margin-bottom: 32px;

  color: var(--chocolate-light);

  font-size: 13px;

  line-height: 1.9;
}


/* =========================================================
   BUTTON
========================================================= */

.btn {
  width: max-content;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 16px 28px;

  border: 1px solid var(--chocolate);

  background: var(--chocolate);

  color: #ffffff;

  font-size: 9px;
  font-weight: 500;

  letter-spacing: 0.13em;

  text-transform: uppercase;

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.btn:hover {
  border-color: var(--gold);

  background: var(--gold);

  transform: translateY(-2px);
}


/* =========================================================
   HERO IMAGE
========================================================= */

.hero-media {
  min-height: 650px;

  background-color: var(--nude);

  background-image:
    linear-gradient(
      rgba(58, 41, 34, 0.02),
      rgba(58, 41, 34, 0.02)
    ),
    url("https://images.unsplash.com/photo-1611652022419-a9419f74343d?auto=format&fit=crop&w=1800&q=90");

  background-position: center;
  background-size: cover;

  background-repeat: no-repeat;
}


/* =========================================================
   GENERAL SECTIONS
========================================================= */

.section {
  padding: 100px 42px;
}

.section-head {
  margin-bottom: 46px;

  text-align: center;
}

.section-title {
  color: var(--chocolate);

  font-family: "Cormorant Garamond", serif;

  font-size: 50px;
  font-weight: 500;

  line-height: 1;
}

.gold-line {
  width: 45px;
  height: 1px;

  margin: 17px auto 0;

  background: var(--gold);
}


/* =========================================================
   CATEGORY GRID
========================================================= */

.categories {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 18px;
}

.category {
  position: relative;

  height: 400px;

  overflow: hidden;

  background: var(--nude);
}

.category img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.7s ease;
}

.category:hover img {
  transform: scale(1.05);
}

.category-info {
  position: absolute;

  inset: 0;

  display: flex;

  flex-direction: column;

  justify-content: flex-end;

  padding: 28px;

  color: #ffffff;

  background:
    linear-gradient(
      to bottom,
      transparent 35%,
      rgba(45, 27, 20, 0.78) 100%
    );
}

.category-info h3 {
  font-family: "Cormorant Garamond", serif;

  font-size: 34px;
  font-weight: 500;
}

.category-info span {
  margin-top: 5px;

  font-size: 9px;

  letter-spacing: 0.13em;

  text-transform: uppercase;
}


/* =========================================================
   PRODUCTS
========================================================= */

.products {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 25px;
}

.product {
  min-width: 0;
}

.product-image {
  position: relative;

  width: 100%;

  aspect-ratio: 1 / 1;

  overflow: hidden;

  background: var(--cream);
}

.product-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.55s ease;
}

.product:hover .product-image img {
  transform: scale(1.045);
}

.product-tag {
  position: absolute;

  top: 13px;
  left: 13px;

  z-index: 3;

  padding: 7px 10px;

  background: var(--nude);

  color: var(--chocolate);

  font-size: 8px;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}

.favorite {
  position: absolute;

  top: 13px;
  right: 13px;

  z-index: 3;

  width: 33px;
  height: 33px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.94);

  color: var(--chocolate);

  font-size: 17px;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.favorite:hover {
  background: var(--chocolate);

  color: #ffffff;
}

.product-info {
  padding-top: 15px;
}

.product-name {
  color: var(--chocolate);

  font-family: "Cormorant Garamond", serif;

  font-size: 24px;
  font-weight: 500;

  line-height: 1.05;
}

.price {
  margin: 6px 0 15px;

  color: var(--chocolate-light);

  font-size: 12px;
}

.add {
  width: 100%;

  padding: 14px;

  border: 1px solid var(--chocolate);

  background: transparent;

  color: var(--chocolate);

  font-size: 9px;

  letter-spacing: 0.12em;

  text-transform: uppercase;

  transition:
    background 0.25s ease,
    color 0.25s ease;
}

.add:hover {
  background: var(--chocolate);

  color: #ffffff;
}


/* =========================================================
   EDITORIAL
========================================================= */

.editorial {
  display: grid;

  grid-template-columns: 1.25fr 1fr;

  min-height: 500px;

  background: var(--nude-light);
}

.editorial-media {
  min-height: 500px;

  background-image:
    url("https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?auto=format&fit=crop&w=1600&q=90");

  background-position: center;

  background-size: cover;

  background-repeat: no-repeat;
}

.editorial-copy {
  display: flex;

  flex-direction: column;

  justify-content: center;

  padding: 75px;
}

.editorial-copy h2 {
  margin-bottom: 25px;

  color: var(--chocolate);

  font-family: "Cormorant Garamond", serif;

  font-size: 58px;
  font-weight: 500;

  line-height: 0.9;
}

.editorial-copy p {
  max-width: 430px;

  margin-bottom: 28px;

  color: var(--chocolate-light);

  font-size: 13px;

  line-height: 1.9;
}

.text-link {
  width: max-content;

  padding-bottom: 5px;

  border-bottom: 1px solid var(--chocolate);

  font-size: 9px;

  letter-spacing: 0.13em;

  text-transform: uppercase;

  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--gold);
}


/* =========================================================
   BENEFITS
========================================================= */

.benefits {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);

  background: var(--white);
}

.benefit {
  padding: 38px 15px;

  text-align: center;
}

.benefit-icon {
  margin-bottom: 11px;

  color: var(--gold);

  font-size: 22px;
}

.benefit h4 {
  margin-bottom: 7px;

  color: var(--chocolate);

  font-size: 9px;
  font-weight: 500;

  letter-spacing: 0.12em;

  text-transform: uppercase;
}

.benefit p {
  color: var(--muted);

  font-size: 10px;
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
  padding: 75px 42px 24px;

  background: var(--chocolate-dark);

  color: #f7f0ea;
}

.footer-grid {
  display: grid;

  grid-template-columns:
    1.4fr
    1fr
    1fr
    1fr
    1.4fr;

  gap: 40px;

  padding-bottom: 55px;
}

.footer-logo {
  color: #ffffff;

  font-family: "Cormorant Garamond", serif;

  font-size: 46px;
  font-weight: 500;

  letter-spacing: 0.15em;
}

.footer-desc {
  max-width: 270px;

  margin-top: 17px;

  color: #cdbcb0;

  font-size: 11px;

  line-height: 1.8;
}

.footer h4 {
  margin-bottom: 19px;

  color: #ffffff;

  font-size: 9px;

  font-weight: 500;

  letter-spacing: 0.15em;

  text-transform: uppercase;
}

.footer a {
  display: block;

  margin-bottom: 12px;

  color: #cdbcb0;

  font-size: 10px;

  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--gold-light);
}

.newsletter p {
  color: #cdbcb0;

  font-size: 10px;

  line-height: 1.6;
}

.newsletter input {
  width: 100%;

  margin-top: 13px;

  padding: 13px;

  border: 1px solid #806b5e;

  outline: none;

  background: transparent;

  color: #ffffff;

  font-size: 10px;
}

.newsletter input::placeholder {
  color: #a99589;
}

.newsletter button {
  margin-top: 9px;

  padding: 13px 18px;

  border: 0;

  background: var(--gold);

  color: #ffffff;

  font-size: 9px;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}

.footer-bottom {
  display: flex;

  align-items: center;

  justify-content: space-between;

  padding-top: 20px;

  border-top: 1px solid rgba(255, 255, 255, 0.12);

  color: #a99589;

  font-size: 9px;
}


/* =========================================================
   CART OVERLAY
========================================================= */

.overlay {
  position: fixed;

  inset: 0;

  z-index: 200;

  background: rgba(35, 20, 15, 0.38);

  opacity: 0;

  visibility: hidden;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.overlay.active {
  opacity: 1;

  visibility: visible;
}


/* =========================================================
   CART
========================================================= */

.cart {
  position: fixed;

  top: 0;
  right: 0;

  z-index: 201;

  width: min(440px, 100%);

  height: 100vh;

  display: flex;

  flex-direction: column;

  background: var(--white);

  box-shadow: var(--shadow);

  transform: translateX(100%);

  transition:
    transform 0.35s ease;
}

.cart.active {
  transform: translateX(0);
}

.cart-head {
  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 27px;

  border-bottom: 1px solid var(--border);
}

.cart-head h2 {
  color: var(--chocolate);

  font-family: "Cormorant Garamond", serif;

  font-size: 33px;
  font-weight: 500;
}

.close {
  border: 0;

  background: transparent;

  color: var(--chocolate);

  font-size: 27px;
}

.cart-items {
  flex: 1;

  overflow-y: auto;

  padding: 25px;
}

.cart-item {
  display: grid;

  grid-template-columns: 78px 1fr auto;

  gap: 14px;

  padding-bottom: 20px;

  margin-bottom: 20px;

  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 78px;
  height: 78px;

  object-fit: cover;
}

.cart-item h3 {
  color: var(--chocolate);

  font-family: "Cormorant Garamond", serif;

  font-size: 20px;
  font-weight: 500;
}

.cart-item small {
  display: block;

  margin-top: 5px;

  color: var(--chocolate-light);

  font-size: 11px;
}

.qty {
  display: flex;

  align-items: center;

  margin-top: 10px;
}

.qty button {
  width: 25px;
  height: 25px;

  border: 1px solid var(--border);

  background: transparent;

  color: var(--chocolate);
}

.qty span {
  width: 30px;

  text-align: center;

  font-size: 10px;
}

.remove {
  border: 0;

  background: transparent;

  color: var(--muted);

  font-size: 12px;
}

.empty {
  padding: 75px 20px;

  color: var(--muted);

  text-align: center;

  font-size: 12px;
}

.cart-foot {
  padding: 25px;

  border-top: 1px solid var(--border);
}

.row {
  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 11px;

  color: var(--chocolate-light);

  font-size: 11px;
}

.row.total {
  padding-top: 15px;

  margin-top: 13px;

  border-top: 1px solid var(--border);

  color: var(--chocolate);

  font-size: 15px;
}

.checkout {
  width: 100%;

  margin-top: 19px;

  padding: 17px;

  border: 0;

  background: var(--chocolate);

  color: #ffffff;

  font-size: 9px;

  letter-spacing: 0.13em;

  text-transform: uppercase;

  transition: background 0.25s ease;
}

.checkout:hover {
  background: var(--gold);
}


/* =========================================================
   ANIMACIONES
========================================================= */

.hero-copy {
  animation: scalaFadeUp 0.8s ease both;
}

.hero-media {
  animation: scalaFadeIn 1s ease both;
}

@keyframes scalaFadeUp {

  from {
    opacity: 0;

    transform: translateY(20px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }

}

@keyframes scalaFadeIn {

  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

  .header {
    grid-template-columns: auto 1fr auto;

    padding: 0 25px;
  }

  .nav {
    display: none;
  }

  .mobile-menu {
    display: flex;

    align-items: center;
    justify-content: center;
  }

  .logo {
    justify-self: center;
  }

  .hero-copy {
    padding: 60px;
  }

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

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

  .editorial-media {
    min-height: 420px;
  }

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

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

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  .topbar {
    height: 30px;

    padding: 0 10px;

    font-size: 7px;

    letter-spacing: 0.1em;

    text-align: center;
  }

  .header {
    height: 68px;

    padding: 0 17px;
  }

  .logo {
    font-size: 33px;

    letter-spacing: 0.15em;
  }

  .logo small {
    display: none;
  }

  .actions {
    gap: 7px;
  }

  .icon-btn {
    width: 23px;
    height: 23px;

    font-size: 16px;
  }

  .hero {
    display: flex;

    flex-direction: column;
  }

  .hero-copy {
    min-height: 470px;

    padding: 60px 25px;
  }

  .hero h1 {
    font-size: 61px;

    line-height: 0.86;
  }

  .hero p {
    font-size: 12px;
  }

  .hero-media {
    min-height: 470px;

    background-position: center;
  }

  .section {
    padding: 70px 18px;
  }

  .section-title {
    font-size: 42px;
  }

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

    gap: 10px;
  }

  .category {
    height: 270px;
  }

  .category-info {
    padding: 16px;
  }

  .category-info h3 {
    font-size: 25px;
  }

  .product-name {
    font-size: 19px;
  }

  .product-tag {
    top: 8px;
    left: 8px;

    padding: 5px 7px;
  }

  .favorite {
    top: 8px;
    right: 8px;

    width: 29px;
    height: 29px;
  }

  .editorial-media {
    min-height: 350px;
  }

  .editorial-copy {
    padding: 50px 25px;
  }

  .editorial-copy h2 {
    font-size: 46px;
  }

  .benefit {
    padding: 30px 10px;
  }

  .footer {
    padding: 60px 22px 22px;
  }

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

    gap: 35px;
  }

  .footer-bottom {
    flex-direction: column;

    align-items: flex-start;

    gap: 9px;
  }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 390px) {

  .hero h1 {
    font-size: 52px;
  }

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

  .category {
    height: 360px;
  }

}