/* Paleta derivada de la logomarca CDE Shop:
   negro del sello, verde lima de "SHOP", dorado del puente/caja.
   Lima = CTA/acción (verde "avanzar", ahorro, Brasil); negro = premium;
   dorado = valor/oferta; rojo solo para precio/descuento (urgencia). */
:root {
  --shop-ink: #101410;
  --shop-ink-2: #1b211a;
  --shop-lime: #8ae02b;
  --shop-lime-dark: #74c41f;
  --shop-gold: #f5b301;
  --shop-gold-dark: #d99e00;
  --shop-link: #3f7000;
  --shop-bg: #f2f4ee;
  --shop-border: #d7dcd2;
  --shop-danger: #b12704;
  --shop-success: #2e7d1e;
}

body {
  background: var(--shop-bg);
  color: #111;
  overflow-x: hidden;
}

a {
  color: var(--shop-link);
}

.shop-header {
  background: var(--shop-ink);
  color: #fff;
  border-bottom: 2px solid var(--shop-lime);
}

.shop-header .navbar-brand,
.shop-header .nav-link,
.shop-header a {
  color: #fff;
}

.shop-header .navbar-brand {
  font-size: 1.45rem;
  letter-spacing: 0;
  max-width: min(54vw, 320px);
}

.shop-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
  flex: 0 0 auto;
}

.shop-header .navbar-toggler {
  border-color: rgba(255, 255, 255, .45);
}

.shop-header .navbar-toggler:focus {
  box-shadow: 0 0 0 .15rem rgba(138, 224, 43, .5);
}

.shop-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.shop-search {
  flex: 1 1 auto;
  max-width: 760px;
}

.shop-search .form-control {
  border: 0;
  border-radius: 4px 0 0 4px;
  min-height: 42px;
  min-width: 0;
}

.shop-search .form-control:focus {
  box-shadow: 0 0 0 .15rem rgba(138, 224, 43, .55);
}

.shop-search .btn {
  background: var(--shop-lime);
  border-color: var(--shop-lime);
  color: #101410;
  font-weight: 600;
  border-radius: 0 4px 4px 0;
  min-width: 86px;
}

.shop-search .btn:hover,
.btn-shop-primary:hover {
  background: var(--shop-lime-dark);
  border-color: var(--shop-lime-dark);
  color: #101410;
}

.shop-subnav {
  background: var(--shop-ink-2);
  color: #fff;
  font-size: .92rem;
}

.shop-subnav a {
  color: #fff;
  text-decoration: none;
}

.shop-subnav a:hover,
.shop-subnav a:focus {
  color: var(--shop-lime);
}

.shop-cart-link {
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 4px;
  color: #fff;
  padding: .45rem .75rem;
  text-decoration: none;
  white-space: nowrap;
}

.shop-cart-link:hover {
  border-color: var(--shop-lime);
  color: var(--shop-lime);
}

.language-selector .dropdown-menu {
  min-width: 10rem;
}

.language-selector .dropdown-item {
  align-items: center;
  display: flex;
  gap: .5rem;
}

.shop-header-actions {
  min-width: 0;
}

.shop-header-actions > * {
  max-width: 100%;
}

.product-card-image-link {
  display: block;
  text-decoration: none;
}

.product-card-image-link:focus {
  outline: 2px solid var(--shop-lime);
  outline-offset: 2px;
}

.shop-shell {
  max-width: 1480px;
}

.shop-panel {
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 4px;
}

.product-card-grid {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

.shop-hero {
  background: linear-gradient(180deg, #141a12 0%, #2e3d24 60%, var(--shop-bg) 100%);
  color: #fff;
  min-height: 220px;
  display: flex;
  align-items: flex-start;
}

.shop-hero-inner {
  padding: 2rem 1.25rem 5rem;
}

.shop-hero h1 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: 0;
}

.shop-home-grid {
  margin-top: -72px;
  position: relative;
  z-index: 2;
}

.shop-card {
  border: 1px solid var(--shop-border);
  border-radius: 4px;
  min-width: 0;
  transition: box-shadow .15s ease, transform .15s ease;
}

.shop-card .card-title,
.shop-card .card-text {
  overflow-wrap: anywhere;
}

.shop-card:hover {
  box-shadow: 0 2px 10px rgba(15, 17, 17, .14);
  transform: translateY(-1px);
}

.shop-card .card-img-top {
  background: #f7fafa;
}

.shop-price {
  color: var(--shop-danger);
  font-size: 1.05rem;
}

.shop-muted {
  color: #565959;
}

.shop-stock {
  color: var(--shop-success);
}

.btn-shop-primary {
  background: var(--shop-lime);
  border-color: var(--shop-lime);
  color: #101410;
  font-weight: 600;
  border-radius: 999px;
}

.btn-shop-secondary {
  background: var(--shop-gold);
  border-color: var(--shop-gold-dark);
  color: #101410;
  border-radius: 999px;
}

.btn-shop-secondary:hover {
  background: var(--shop-gold-dark);
  border-color: #c28e00;
  color: #101410;
}

.btn-shop-outline {
  border-color: var(--shop-border);
  color: #111;
  background: #fff;
}

.btn-shop-outline:hover {
  border-color: #888c8c;
  background: #f7fafa;
}

.shop-table th {
  background: #f7fafa;
  color: #565959;
  font-weight: 600;
}

.cart-summary-panel {
  max-width: 100%;
  min-width: 280px;
}

.cart-quantity-form .form-control {
  max-width: 90px;
}

.cart-table-wrap {
  overflow-x: auto;
}

.cart-table-wrap .table {
  min-width: 720px;
}

.shop-section-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.product-gallery {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 1rem;
}

.product-thumbs {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-height: 560px;
  overflow-y: auto;
}

.product-thumb {
  width: 68px;
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 4px;
  padding: 3px;
  cursor: pointer;
}

.product-thumb.is-active,
.product-thumb:hover {
  border-color: var(--shop-lime);
  box-shadow: 0 0 0 2px rgba(138, 224, 43, .35);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-main-frame {
  position: relative;
  min-height: 430px;
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-main-image {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.product-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 54px;
  border: 1px solid var(--shop-border);
  background: rgba(255, 255, 255, .92);
  color: #111;
  font-size: 2rem;
  line-height: 1;
}

.product-gallery-prev {
  left: .5rem;
}

.product-gallery-next {
  right: .5rem;
}

.product-gallery-nav:hover {
  border-color: #888c8c;
  background: #fff;
}

@media (max-width: 991.98px) {
  .shop-search {
    max-width: none;
    width: 100%;
  }

  .shop-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .shop-home-grid {
    margin-top: -48px;
  }

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

  .product-thumbs {
    order: 2;
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
  }

  .product-main-frame {
    min-height: 320px;
  }
}

@media (max-width: 575.98px) {
  .shop-header .navbar-brand {
    max-width: 68vw;
    font-size: 1.2rem;
  }

  .shop-logo {
    width: 34px;
    height: 34px;
  }

  .shop-search .form-control,
  .shop-search .btn {
    border-radius: 4px;
    width: 100%;
  }

  .shop-cart-link,
  .shop-header-actions .btn,
  .language-selector {
    flex: 1 1 100%;
    text-align: center;
  }

  .cart-table-wrap {
    border: 0;
    overflow: visible;
  }

  .cart-table-wrap .table {
    min-width: 0;
  }

  .cart-table-wrap thead {
    display: none;
  }

  .cart-table-wrap tbody,
  .cart-table-wrap tr,
  .cart-table-wrap td {
    display: block;
    width: 100%;
  }

  .cart-table-wrap tr {
    background: #fff;
    border: 1px solid var(--shop-border);
    border-radius: 6px;
    margin-bottom: .85rem;
    padding: .85rem;
  }

  .cart-table-wrap td {
    border: 0;
    padding: .35rem 0;
  }

  .cart-quantity-form {
    flex-direction: column;
  }

  .cart-quantity-form .form-control,
  .cart-quantity-form .btn,
  .cart-summary-panel {
    max-width: none;
    width: 100%;
  }
}
