/* =========================
   TIENDA ESTILO RETAIL PREMIUM
   ========================= */

:root{
  --shop-text: #111111;
  --shop-muted: #666666;
  --shop-line: #e7e7e7;
  --shop-bg: #ffffff;
  --shop-panel: #fafafa;
  --shop-accent: #000000;
  --shop-btn: #0b2345; /* tu navy */
}

/* ===== CONTENEDOR GENERAL ===== */
.store-layout{
  display:grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items:start;
}

.store-sidebar{
  position: sticky;
  top: 20px;
}

.store-main{
  min-width: 0;
}

/* ===== ENCABEZADO ===== */
.section__head{
  margin-bottom: 26px;
}

.section__head h1{
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0d1730;
  margin-bottom: 14px;
}

.section__head .muted{
  font-size: 15px;
  color: var(--shop-muted);
  max-width: 760px;
  margin: 0 auto;
}

/* ===== SIDEBAR FILTROS ===== */
.filters-card{
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.filters-card__title{
  font-size: 15px;
  font-weight: 700;
  color: var(--shop-text);
  margin: 0 0 18px;
  text-align: left;
}

.filter-group{
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--shop-line);
}

.filter-group:last-of-type{
  border-bottom: 0;
}

.filter-group label{
  display:block;
  font-size: 13px;
  font-weight: 700;
  color: var(--shop-text);
  margin-bottom: 10px;
  text-align:left;
}

.filter-group select,
.filter-group input{
  width: 100%;
  height: 42px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: var(--shop-text);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  box-shadow: none;
}

.filter-group input::placeholder{
  color: #999;
}

.filter-group select:focus,
.filter-group input:focus{
  border-color: #999;
}

/* ===== BOTONES FILTROS ===== */
.filters-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 14px;
}

.filters-actions .btn{
  width:100%;
  border-radius: 999px;
  height: 46px;
  font-size: 14px;
  font-weight: 700;
}

.btn--secondary{
  background: var(--shop-btn);
  color: #fff;
  border: 1px solid var(--shop-btn);
}

.btn--light{
  background: #fff;
  color: #12233d;
  border: 2px solid #12233d;
  box-shadow: none;
}

.btn--light:hover{
  background: #f7f8fa;
}

/* ===== BARRA SUPERIOR DERECHA ===== */
.storebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom: 24px;
}

.storebar__search{
  flex: 1 1 480px;
  display:flex;
  align-items:center;
  gap:12px;
  border: 1px solid var(--shop-line);
  border-radius: 999px;
  background:#fff;
  padding: 10px 12px 10px 16px;
  box-shadow: none;
}

.storebar__search input{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  font-size:15px;
  color: var(--shop-text);
}

.storebar__search input::placeholder{
  color:#888;
}

.storebar__search .btn{
  border-radius:999px;
  height:44px;
  min-width:120px;
  font-size:14px;
}

.storebar__actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
}

.btn-cart{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:999px;
  white-space:nowrap;
}

.btn-cart__icon{
  width:18px;
  height:18px;
  object-fit:contain;
}

/* ===== BOTÓN FILTROS SOLO MÓVIL ===== */
.store-mobile-tools{
  display:none;
  margin-bottom:16px;
}

.btn-filter-toggle{
  width:100%;
  height:46px;
  border-radius:999px;
  border:1px solid #d8d8d8;
  background:#fff;
  color:#111;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}

/* ===== GRID PRODUCTOS ===== */
.store-main .storegrid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 26px;
}

.product{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  position: relative;
}

.product__media{
  position: relative;
  aspect-ratio: 1 / 1.15;
  background: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 8px;
}

.product__media img{
  width:100%;
  height:100%;
  object-fit: contain;
  transition: transform .25s ease;
}

@media (hover:hover){
  .product:hover .product__media img{
    transform: scale(1.03);
  }
}

.product__badge{
  position:absolute;
  top:10px;
  left:10px;
  background:#111;
  color:#fff;
  font-size:10px;
  font-weight:700;
  padding:4px 8px;
  border-radius:999px;
  letter-spacing:.04em;
}

.product__body{
  padding-top: 12px;
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.product__brand{
  margin:0;
  font-size:13px;
  font-weight:700;
  color:#111;
  text-transform:none;
  letter-spacing:0;
}

.product__title{
  margin:0;
  font-size:14px;
  font-weight:400;
  line-height:1.35;
  color:#1a1a1a;

  display:-webkit-box;  
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 38px;
}

.product__code{
  margin:0;
  font-size:12px;
  color:#777;
}

.product__prices{
  margin-top: 2px;
}

.product__price{
  font-size:15px;
  font-weight:700;
  color:#111;
}

/* ===== BOTÓN CARGAR MÁS ===== */
#btnLoadMore{
  margin-top: 34px !important;
  border-radius:999px;
  min-width:220px;
  height:46px;
}

/* ===== DESKTOP MEDIO ===== */
@media (max-width: 1200px){
  .store-main .storegrid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== TABLET ===== */
@media (max-width: 900px){
  .store-layout{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .store-sidebar{
    position: static;
  }

  .store-mobile-tools{
    display:block;
  }

  /* oculto sidebar de entrada */
  .store-sidebar{
    display:none;
  }

  .store-sidebar.is-open{
    display:block;
  }

  .filters-card{
    background:#fff;
    border:1px solid var(--shop-line);
    border-radius:16px;
    padding:18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.05);
  }

  .storebar{
    flex-direction:column;
    align-items:stretch;
  }

  .storebar__search{
    width:100%;
    flex:1 1 auto;
  }

  .storebar__actions{
    width:100%;
  }

  .storebar__actions .btn-cart{
    width:100%;
  }

  .store-main .storegrid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
  }

  .product__title{
    font-size:13px;
    min-height: 36px;
  }

  .product__brand{
    font-size:12px;
  }

  .product__price{
    font-size:14px;
  }
}

/* ===== MÓVIL PEQUEÑO ===== */
@media (max-width: 520px){
  .section{
    padding: 34px 0;
  }

  .section__head h1{
    font-size: clamp(26px, 9vw, 42px);
    line-height: 1.05;
  }

  .section__head .muted{
    font-size:14px;
  }

  .storebar__search{
    padding: 8px 10px 8px 14px;
  }

  .storebar__search .btn{
    min-width: 96px;
    height: 40px;
    font-size: 13px;
  }

  .store-main .storegrid{
    gap: 18px 12px;
  }

  .product__media{
    aspect-ratio: 1 / 1.1;
  }

  .product__body{
    padding-top: 10px;
  }
}

.storebar__sort{
  display:flex;
  align-items:center;
  gap:10px;
}

.sort-label{
  font-size:13px;
  color:#777;
  font-weight:600;
  letter-spacing:.3px;
}

.storebar__sort{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}

.sort-label{
  font-size:13px;
  color:#666;
  font-weight:600;
}

/* 🔥 SELECT BONITO */
.storebar__sort select{
  height:42px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:14px;
  cursor:pointer;  
  transition:.2s ease;
}

.storebar__sort select:hover{
  border-color:#bbb;
}

.storebar__sort select:focus{
  outline:none;
  border-color:var(--accent);
}

.storebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

@media (max-width:768px){
  .storebar{
    flex-direction:column;
    align-items:stretch;
  }

  .storebar__sort{
    justify-content:space-between;
  }

  .storebar__sort select{
    width:50%;
  }
}

@media (max-width: 900px){
  .store-sidebar{
    display: none;
  }

  .store-sidebar.is-open{
    display: block;
    margin-bottom: 16px;
  }
}

/* ===== TIENDA MÁS ANCHA EN DESKTOP ===== */
@media (min-width: 1200px){
  main .section > .container{
    width: min(1500px, 96%);
    max-width: 1500px;
  }
}

@media (min-width: 1200px){
  .store-layout{
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 44px;
  }

  .store-main .storegrid{
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 40px 30px;
  }
}

@media (min-width: 1400px){
  main .section > .container{
    width: min(1650px, 96%);
    max-width: 1650px;
  }

  .store-layout{
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 50px;
  }

  .store-main .storegrid{
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 44px 34px;
  }
}