/* ============================================
   TIENDA — Página de catálogo
   ============================================ */

/* ---------- HERO / BREADCRUMB ---------- */
.shop-hero {
    padding: 120px 0 40px;
    background: var(--gradient-hero);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--text-lighter);
    margin-bottom: 12px;
}
.breadcrumb a {
    color: var(--purple);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-lighter); }
.shop-hero__title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.shop-hero__text {
    color: var(--text-light);
    font-size: .95rem;
}

/* ---------- LAYOUT ---------- */
.shop {
    padding: 40px 0 80px;
}
.shop__layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

/* ---------- SIDEBAR ---------- */
.shop__sidebar {
    position: sticky;
    top: calc(var(--header-h) + 20px);
}
.shop__sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.shop__sidebar-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
}
.shop__sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-lighter);
    cursor: pointer;
}

/* Filter groups */
.filter-group {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(45, 27, 105, .06);
}
.filter-group:last-of-type { border-bottom: none; }
.filter-group__title {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-lighter);
    margin-bottom: 12px;
}

/* Search */
.filter-search {
    position: relative;
}
.filter-search svg {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    pointer-events: none;
}
.filter-input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1.5px solid rgba(45, 27, 105, .1);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-card);
    transition: border-color var(--transition);
    outline: none;
}
.filter-input:focus {
    border-color: var(--purple-light);
}
.filter-input--small {
    padding: 8px 10px 8px 28px;
    font-size: .85rem;
}

/* Categories list */
.filter-cats {
    list-style: none;
    padding: 0;
    margin: 0;
}
.filter-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition);
}
.filter-cat:hover {
    background: var(--bg-soft);
    color: var(--text);
}
.filter-cat--active {
    background: var(--purple);
    color: #fff;
    font-weight: 500;
}
.filter-cat--active:hover {
    background: var(--purple-light);
    color: #fff;
}
.filter-cat__count {
    font-size: .75rem;
    min-width: 24px;
    text-align: center;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: rgba(45, 27, 105, .06);
    color: var(--text-lighter);
}
.filter-cat--active .filter-cat__count {
    background: rgba(255,255,255,.2);
    color: rgba(255,255,255,.9);
}

/* Price */
.filter-price__inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-price__field {
    position: relative;
    flex: 1;
}
.filter-price__field span {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    font-size: .82rem;
}
.filter-price__sep {
    color: var(--text-lighter);
}

/* Clear */
.filter-clear {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    color: var(--text-lighter);
    text-decoration: none;
    border: 1px dashed rgba(45, 27, 105, .15);
    transition: all var(--transition);
    margin-top: 8px;
}
.filter-clear:hover {
    color: var(--purple);
    border-color: var(--purple-light);
    background: var(--bg-soft);
}

/* Dropdown select */
.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1.5px solid rgba(45, 27, 105, .1);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .85rem;
    color: var(--text);
    background: var(--bg-card);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236b6089' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.filter-select:focus { border-color: var(--purple-light); }

/* ---------- TOOLBAR ---------- */
.shop__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0 24px;
    border-bottom: 1px solid rgba(45, 27, 105, .06);
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.shop__filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid rgba(45, 27, 105, .1);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .85rem;
    color: var(--text);
    background: var(--bg-card);
    cursor: pointer;
}
.shop__count {
    font-size: .88rem;
    color: var(--text-light);
}
.shop__toolbar-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}
.shop__toolbar-sort label {
    font-size: .82rem;
    color: var(--text-lighter);
    white-space: nowrap;
}

/* ---------- GRID ---------- */
.shop__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ---------- CARD (Shopify style) ---------- */
.card-wrapper {
    position: relative;
    min-width: 0;
}
.card {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: var(--bg-card);
}
.card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.card__media {
    position: relative;
    padding-top: 125%; /* 4:5 portrait ratio */
    overflow: hidden;
    background: var(--bg-soft);
}
.card__media img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s cubic-bezier(.25, .1, .25, 1);
}
.card:hover .card__media img {
    transform: scale(1.05);
}
.card__placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--bg-soft);
}
.card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--purple);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    letter-spacing: .3px;
    text-transform: uppercase;
    z-index: 2;
}
.card__sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    z-index: 2;
}

/* Card info (outside the image block) */
.card__info {
    padding: 14px 4px 8px;
}
.card__category {
    display: block;
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #888;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card__heading {
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card__heading a {
    text-decoration: none;
    color: var(--text);
    transition: color var(--transition);
}
.card__heading a:hover {
    color: var(--purple);
}
.card__price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
}
.card__price-current {
    color: var(--text);
    font-weight: 500;
}
.card__price-current--sale {
    color: #e74c3c;
}
.card__price-old {
    color: var(--text-lighter);
    font-size: .82rem;
    text-decoration: line-through;
}

/* ---------- EMPTY ---------- */
.shop__empty {
    text-align: center;
    padding: 80px 20px;
}
.shop__empty span {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 16px;
}
.shop__empty h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text);
}
.shop__empty p { color: var(--text-light); font-size: .9rem; }
.shop__empty a { color: var(--purple); text-decoration: underline; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .shop__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .shop__layout {
        grid-template-columns: 1fr;
    }
    .shop__sidebar {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 300px;
        height: 100vh;
        background: var(--bg-card);
        z-index: 1100;
        padding: 24px;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    .shop__sidebar--open {
        display: block;
    }
    .shop__sidebar-close {
        display: block;
    }
    .shop__filter-toggle {
        display: flex;
    }
    .shop__toolbar-info {
        display: none;
    }
    .shop__toolbar {
        justify-content: space-between;
    }
    .shop-hero__title { font-size: 1.6rem; }
}

@media (max-width: 520px) {
    .shop__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .shop__toolbar-sort label { display: none; }
    .card__heading { font-size: .78rem; }
    .card__price { font-size: .78rem; }
    .card__info { padding: 10px 2px 6px; }
    .shop { padding: 24px 0 60px; }
    .shop-hero { padding: 110px 0 30px; }
    .container { padding: 0 12px; }
}
