@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --white: #ffffff;
  --sand: #ffffff;
  --coral: #e8836b;
  --pool-blue: #2cb5c0;
  --black: #1a1a1a;
  --sale-red: #c0392b;
  --gray-light: #eeeeee;
  --gray: #999999;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --radius: 8px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--white);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* ============ TOP BAR ============ */
.top-bar {
  background: var(--coral);
  color: var(--white);
  text-align: center;
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 480px) {
  .top-bar {
    font-size: 11px;
    white-space: normal;
  }
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
}

.header__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.header__logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--black);
  padding: 6px;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--coral);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile menu */
.header__links {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--gray-light);
  padding: 0;
}

.header__links.mobile-open {
  display: flex;
}

.header__links a {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--gray-light);
}

.header__links a:active {
  background: var(--sand);
}

@media (min-width: 768px) {
  .hamburger-btn { display: none; }
  .header__links {
    display: flex !important;
    flex-direction: row;
    border: none;
    justify-content: center;
    gap: 0;
  }
  .header__links a {
    border: none;
    padding: 10px 16px;
    font-size: 13px;
  }
  .header__links a:hover {
    color: var(--coral);
  }
}

/* Header right icons */
.header__right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============ SEARCH BAR ============ */
.search-bar {
  display: none;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--gray-light);
  position: relative;
}

.search-bar.active {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  border-color: var(--coral);
}

.search-bar__close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
  padding: 4px;
}

/* Search Results */
.search-results {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.search-results__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--gray);
}

.search-results__header button {
  background: none;
  border: none;
  color: var(--coral);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

/* ============ CATEGORY CAROUSEL ============ */
.categories-section {
  padding: 20px 0 8px;
}

.categories-section__title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--coral);
  margin-bottom: 14px;
}

.category-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 16px;
  scrollbar-width: none;
}

.category-carousel::-webkit-scrollbar {
  display: none;
}

.cat-slide {
  flex: 0 0 45%;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
  display: block;
}

@media (min-width: 768px) {
  .cat-slide {
    flex: 0 0 30%;
  }
}

@media (min-width: 1024px) {
  .cat-slide {
    flex: 0 0 19%;
  }
}

.cat-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cat-slide:hover img {
  transform: scale(1.04);
}

.cat-slide__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

/* ============ BESTSELLERS CAROUSEL ============ */
.bestsellers-section {
  padding: 24px 0 20px;
  background: #ffffff;
}

.bestsellers-section__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0 16px;
  margin-bottom: 16px;
  color: var(--black);
  text-transform: uppercase;
}

.bestsellers-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 20px;
  scrollbar-width: none;
}

.bestsellers-carousel::-webkit-scrollbar {
  display: none;
}

.bestsellers-carousel .product-card {
  flex: 0 0 58%;
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .bestsellers-carousel .product-card { flex: 0 0 34%; }
}
@media (min-width: 1024px) {
  .bestsellers-carousel .product-card { flex: 0 0 22%; }
}

/* ============ MAIN CONTENT ============ */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* Category section header */
.cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-light);
}

.cat-header__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.cat-header__count {
  font-size: 12px;
  color: var(--gray);
  font-weight: 400;
}

.cat-header:first-child {
  margin-top: 16px;
}

/* ============ PRODUCT GRID ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* ============ PRODUCT CARD ============ */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #eee;
  box-shadow: 0 6px 16px rgba(26, 26, 26, 0.05);
}

.product-card:hover {
  box-shadow: 0 12px 28px rgba(232, 131, 107, 0.18);
}

.product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--coral);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  z-index: 2;
}

.product-card__tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--sand);
  color: var(--black);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  z-index: 2;
}

.product-card__img-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #ffffff !important;
  display: block;
}

.product-card__img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px 8px 2px;
  background: #ffffff !important;
}

.product-card__info {
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #ffffff;
}

.product-card__title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
  margin-bottom: 4px;
}

.product-card__prices {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.price-compare {
  color: #b5b5b5;
  text-decoration: line-through;
  font-size: 12px;
  font-weight: 500;
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.price-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--coral);
}

.price-sale {
  color: var(--coral);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.4px;
  line-height: 1;
}

.product-card__pay {
  font-size: 10px;
  color: #3d8b6e;
  font-weight: 600;
  margin: 4px 0 8px;
}

.btn-comprar {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-comprar:hover { background: #d9735c; }
.btn-comprar:active { transform: scale(0.98); }

/* Color swatches */
.product-card__colors {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  display: inline-block;
  transition: transform 0.15s;
}

.color-swatch:hover {
  transform: scale(1.3);
}

/* ============ FOOTER ============ */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer__col h3 { margin-bottom: 0.75rem; font-size: 18px; letter-spacing: 2px; }
.footer__col h4 { margin-bottom: 0.75rem; font-size: 14px; }
.footer__col p { font-size: 13px; color: #aaa; line-height: 1.5; }
.footer__col ul li { margin-bottom: 0.4rem; }
.footer__col a { color: #aaa; font-size: 13px; transition: color 0.2s; }
.footer__col a:hover { color: var(--white); }

.footer__bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  font-size: 12px;
  color: #777;
}

@media (min-width: 768px) {
  .footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ============ CART DRAWER ============ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--white);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.cart-drawer.active { transform: translateX(0); }

.cart-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-light);
}
.cart-drawer__header h3 { font-size: 15px; font-weight: 700; letter-spacing: 1px; }

.close-btn {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--black);
  padding: 2px;
}

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item img {
  width: 65px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  background: #ffffff;
}

.cart-item__info { flex: 1; }
.cart-item__title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.cart-item__price { font-size: 14px; font-weight: 600; color: var(--sale-red); margin-bottom: 4px; }

.cart-item__remove {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--gray);
  cursor: pointer;
  text-decoration: underline;
}
.cart-item__remove:hover { color: var(--sale-red); }

.cart-drawer__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-light);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
  font-size: 14px;
}

.btn--primary {
  background: var(--black);
  color: var(--white);
}
.btn--primary:hover { opacity: 0.88; }

.btn--full { width: 100%; display: block; }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.cart-item__qty button {
  width: 26px;
  height: 26px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.cart-item__qty span { font-size: 13px; min-width: 16px; text-align: center; }

/* Inner pages */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}
.page h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}
.page .lead {
  color: #666;
  font-size: 14px;
  margin-bottom: 24px;
}
.page h2 {
  font-size: 16px;
  margin: 28px 0 8px;
}
.page p, .page li {
  font-size: 14px;
  line-height: 1.65;
  color: #444;
}
.page ul { padding-left: 18px; list-style: disc; margin-bottom: 12px; }
.page-empty { text-align: center; color: #888; padding: 48px 16px; }

.form-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.form-stack input,
.form-stack textarea,
.form-stack select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}
.form-stack textarea { min-height: 120px; resize: vertical; }

/* Product page */
.product-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 80px;
}
@media (min-width: 900px) {
  .product-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    padding: 24px 16px 80px;
  }
}
.product-gallery { background: #ffffff; }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.35s ease; }
.carousel-slide { flex: 0 0 100%; min-width: 100%; }
.carousel-slide img { width: 100%; aspect-ratio: 4/5; object-fit: contain; background: #fff; display: block; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 12px; }
.carousel-dots .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ddd; cursor: pointer;
}
.carousel-dots .dot.active { background: #1a1a1a; }
.product-info-block { padding: 20px 16px; }
.product-info-block h1 { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.product-ship {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #2e7d32; margin: 16px 0;
}
.qty-row { display: flex; gap: 10px; margin: 18px 0; }
.quantity-selector {
  display: flex; align-items: center; border: 1px solid #ddd; border-radius: 6px;
}
.qty-btn {
  width: 40px; height: 46px; border: none; background: none; font-size: 20px; cursor: pointer;
}
.qty-val { min-width: 28px; text-align: center; font-weight: 600; }
.add-to-cart-btn {
  flex: 1; background: #1a1a1a; color: #fff; border: none; border-radius: 6px;
  font-weight: 700; letter-spacing: 0.4px; cursor: pointer; font-size: 14px;
}
.product-details { margin-top: 28px; }
.product-details h3 { font-size: 13px; letter-spacing: 1px; margin: 18px 0 6px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.trust-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666; }
.sticky-bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff;
  border-top: 1px solid #eee; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; z-index: 80;
}
.sticky-bottom-bar img { width: 44px; height: 52px; object-fit: cover; border-radius: 4px; }
.sticky-info { flex: 1; min-width: 0; }
.sticky-info div:first-child {
  font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sticky-add-btn {
  background: #1a1a1a; color: #fff; border: none; border-radius: 6px;
  padding: 12px 14px; font-size: 11px; font-weight: 700; cursor: pointer;
}
@media (min-width: 900px) { .sticky-bottom-bar { display: none; } }
.swatches-container { display: flex; gap: 8px; margin-top: 8px; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ccc; cursor: pointer; padding: 0;
}
.swatch.selected { box-shadow: 0 0 0 2px #1a1a1a; transform: scale(1.08); }
