/* =====================================================
   TIENDA — jayroanghelo
   ===================================================== */

.store-hero {
  padding: clamp(40px, 8vw, 90px) clamp(16px, 4vw, 40px) clamp(30px, 5vw, 60px);
  position: relative;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.store-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.store-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: .6rem;
  padding: .3rem .7rem;
  border: 1px solid color-mix(in oklab, var(--brand-2) 35%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--brand-1) 12%, transparent);
}
.store-hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.1;
}
.store-hero-desc {
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 17px);
  margin: 0 0 1.2rem;
}
.store-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  color: color-mix(in oklab, var(--text) 80%, transparent);
  padding: .35rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  backdrop-filter: blur(6px);
}

/* ---- FILTER BAR PREMIUM ---- */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: .8rem clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
}
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
}
.filter-pill-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.filter-pill-group.align-right {
  margin-left: auto;
}
.fp-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-right: .2rem;
}
.fp-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: inherit;
}
.fp-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}
.fp-btn.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}
.c-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.1);
}
.fp-select {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  padding: .2rem;
  outline: none;
  font-family: inherit;
}
.fp-select option {
  background: var(--surface);
  color: var(--text);
}

/* ---- CATALOG ---- */
.store-catalog {
  padding: clamp(20px, 4vw, 36px) clamp(16px, 4vw, 40px) 80px;
}
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(14px, 2.5vw, 24px);
  margin: 0;
}

/* ---- CARD PREMIUM ---- */
.card {
  background: transparent;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  group: true; /* Tailwind-like group logic implemented via standard CSS nesting */
}
.card-img {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 60%, transparent);
  border-radius: 16px;
  margin-bottom: 1rem;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.2,.9,.2,1);
  draggable: false;
}
.card:hover .card-img img {
  transform: scale(1.04);
}
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .6rem;
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
}
.card-badge.badge-new {
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
  color: #fff;
}
.card-badge.badge-limited {
  background: rgba(255, 160, 50, 0.15);
  border: 1px solid rgba(255, 160, 50, 0.4);
  color: #ffb347;
}
.card-body {
  padding: 12px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.card-meta {
  display: none; /* Hide colors and meta to keep gallery clean */
}
.card-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-top: .2rem;
}
.card-price.price-tbd {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  font-style: italic;
}
.card-actions {
  display: none; /* Hide old actions in favor of hover overlay button */
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state svg {
  opacity: .3;
  margin-bottom: 1rem;
}
.empty-state p {
  font-size: 1.05rem;
}

/* =====================================================
   CART DRAWER
   ===================================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
  z-index: 1300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100vw);
  z-index: 1400;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(30px) saturate(200%);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 48px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .2s cubic-bezier(.2,.9,.2,1);
}
.cart-drawer.open {
  transform: translateX(0);
}
.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cart-count-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
.cart-close-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  transition: background .15s;
}
.cart-close-btn:hover {
  background: rgba(0,0,0,.05);
}
.cart-list {
  flex: 1;
  overflow-y: auto;
  padding: .6rem 0;
}
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: .7rem;
  padding: .85rem 1.2rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  align-items: start;
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item img {
  width: 76px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(0,0,0,.03);
}
.cart-item-info h4 {
  margin: 0 0 .2rem;
  font-size: .92rem;
  font-weight: 700;
}
.cart-item-info .item-size {
  font-size: .78rem;
  color: var(--muted);
}
.cart-item-info .item-price {
  font-size: .9rem;
  font-weight: 700;
  margin-top: .35rem;
  color: var(--brand-2);
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .5rem;
}
.cart-item-qty button {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.02);
  color: var(--text);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.cart-item-qty button:hover {
  background: rgba(0,0,0,.08);
}
.cart-item-qty span {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
}
.cart-item-del {
  background: transparent;
  border: none;
  color: color-mix(in oklab, var(--muted) 70%, transparent);
  cursor: pointer;
  padding: .3rem;
  border-radius: 8px;
  transition: color .15s, background .15s;
  display: grid;
  place-items: center;
}
.cart-item-del:hover {
  color: #ff4d4d;
  background: rgba(255,77,77,.1);
}
.cart-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.cart-empty svg {
  opacity: .25;
  margin-bottom: 1rem;
}
.cart-drawer-footer {
  padding: 1.1rem 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  font-weight: 600;
}
.cart-total {
  font-size: 1.2rem;
  font-weight: 900;
}
.cart-price-note {
  margin: 0;
  font-size: .76rem;
  color: var(--muted);
  font-style: italic;
}
.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .9rem 1.2rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  text-decoration: none;
  transition: all .2s ease;
  font-family: inherit;
  box-shadow: var(--shadow-1);
}
.btn-checkout:hover {
  transform: scale(0.98);
  box-shadow: none;
}
.cart-insta-note {
  margin: 0;
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}

/* ========================================================
   FLOATING SEARCH BAR (APPLE GLASS)
   ======================================================== */
.floating-search-wrapper {
  position: fixed;
  bottom: 24px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none; /* Let clicks pass through container */
  z-index: 90;
  padding: 0 16px;
  box-sizing: border-box;
}

.floating-search {
  pointer-events: auto; /* Enable clicks on the bar */
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px; /* Pill shape */
  padding: 8px 16px 8px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  gap: 12px;
  width: 100%;
  max-width: 480px;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.floating-search:focus-within {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.search-icon {
  flex: 0 0 auto;
}

.search-input {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  width: 100%;
  min-width: 0; /* Prevents flex blowout */
}

.search-input::placeholder {
  color: var(--muted);
}

.search-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex: 0 0 auto;
}

.search-select {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
  cursor: pointer;
  appearance: none;
  padding-right: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

/* =====================================================
   QUICK VIEW MODAL
   ===================================================== */
.modal {
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 20px;
  max-width: 860px;
  width: min(92vw, 860px);
  max-height: 90vh;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(30px) saturate(200%);
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  animation: modalIn 0.2s cubic-bezier(.2,.9,.2,1);
  color: var(--text);
  padding: 0;
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(12px);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}
.modal-product .pv-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow-y: auto;
  max-height: calc(90vh - 60px);
}
@media (max-width: 640px) {
  .modal-product .pv-body {
    grid-template-columns: 1fr;
  }
}
.modal-product .pv-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255,255,255,.03);
  display: grid;
  place-items: center;
  cursor: zoom-in;
}
.modal-product .pv-media.zoomed { cursor: grab; }
.modal-product .pv-media.zoomed:active { cursor: grabbing; }
.modal-product #pv-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .18s ease;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.modal-product .pv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.05);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  font-size: 20px;
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  color: var(--text);
}
.modal-product .pv-nav.prev { left: 10px; }
.modal-product .pv-nav.next { right: 10px; }
.modal-product .pv-info {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.modal-product .pv-price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text);
}
.modal-product .pv-description {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.5;
}
.modal-product .pv-sizes {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.modal-product .pv-sizes .sizes-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal-product .pv-sizes .sizes-row {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.modal-product .pv-sizes .size {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: .4rem .7rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.modal-product .pv-sizes .size:hover,
.modal-product .pv-sizes .size.active {
  border-color: var(--brand-1);
  background: color-mix(in oklab, var(--brand-1) 14%, transparent);
  color: var(--brand-2);
}
.modal-product .pv-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.modal-product .pv-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: .88rem;
  padding: .65rem .9rem;
  border-radius: 12px;
  text-decoration: none;
}
.modal-product .pv-actions .btn.primary {
  background: var(--text);
  color: var(--bg);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.modal-product .pv-thumbs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.modal-product .pv-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  opacity: .75;
  transition: opacity .15s, border-color .15s;
}
.modal-product .pv-thumbs img.active,
.modal-product .pv-thumbs img:hover {
  opacity: 1;
  border-color: var(--brand-1);
}

/* =====================================================
   CART BADGE
   ===================================================== */
.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  background: var(--text);
  color: var(--bg);
  font-size: .7rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 2px 6px;
  line-height: 1;
  min-width: 18px;
  text-align: center;
}
.cart-badge-mobile {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #c62828;
  color: #fff;
  font-size: .65rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1;
  min-width: 16px;
  text-align: center;
}
#cart-btn { position: relative; }

/* =====================================================
   TOAST
   ===================================================== */
.toast {
  position: fixed;
  bottom: clamp(20px, 4vw, 30px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,.05);
  color: var(--text);
  padding: .65rem 1.1rem;
  border-radius: 14px;
  font-size: .88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 9999;
  box-shadow: var(--shadow-2);
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
  .store-catalog { padding-inline: 12px; }
  .filter-bar { padding-inline: 12px; }
  .filters-row { flex-wrap: wrap; }
  .floating-search {
    padding: 6px 12px 6px 16px;
  }
  .search-input {
    font-size: 0.95rem;
  }
  .productos-grid {
    column-count: 2;
  }
  .card-body { padding: 10px; }
  .card-title { font-size: .88rem; }
  .cart-drawer { width: 100vw; }
}
@media (max-width: 380px) {
  .productos-grid { column-count: 1; }
}

/* Prevent right-click on images */
.card-img img, #pv-img { pointer-events: none; }
