/* ============================================================
   IL & ELLE — Shop Page Styles
   Only loaded on page-shop.php
   ============================================================ */

/* === SHOP LAYOUT === */
.shop-container { max-width: 1400px; margin: 0 auto; padding: 40px 24px 80px }
.shop-header { text-align: center; margin-bottom: 40px }
.shop-title {
    font-family: var(--font-heading); font-size: 42px;
    font-weight: 400; margin-bottom: 12px; font-style: italic;
}
.shop-count {
    font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 2px;
}
.shop-layout { display: flex; gap: 60px; align-items: flex-start }

/* === SIDEBAR === */
.shop-sidebar {
    width: 260px; flex-shrink: 0; position: sticky; top: 120px; z-index: 100;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.shop-main { flex: 1; min-width: 0 }

/* === FILTER GROUPS === */
.filter-group { border-bottom: 1px solid #eee; padding: 20px 0 }
.filter-header {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; padding: 4px 0;
}
.filter-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
}
.filter-icon { font-size: 14px; transition: transform 0.3s; color: #999 }
.filter-group.active .filter-icon { transform: rotate(45deg) }
.filter-content { display: none; padding: 16px 0 8px }
.filter-group.active .filter-content { display: block }
.filter-option {
    font-size: 13px; color: #555; display: flex; align-items: center;
    gap: 12px; cursor: pointer; margin-bottom: 10px;
}
.filter-option input { cursor: pointer; accent-color: #000; width: 16px; height: 16px }

/* === PRICE SLIDER === */
.price-labels {
    display: flex; justify-content: space-between; font-size: 11px;
    color: #666; margin-bottom: 16px; letter-spacing: 1px;
}
.slider-container { position: relative; height: 2px; background: #eee; margin-top: 10px }
.slider-track { position: absolute; height: 100%; background: #000; left: 0; right: 0 }
.slider-input {
    position: absolute; width: 100%; height: 5px; top: -2px;
    background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.slider-input::-webkit-slider-thumb {
    height: 16px; width: 16px; border-radius: 50%; background: #000;
    border: 2px solid #fff; pointer-events: auto; -webkit-appearance: none;
    appearance: none; cursor: pointer; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* === SWATCH FILTERS === */
.swatch-list { display: flex; flex-wrap: wrap; gap: 8px }
.swatch-color {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid #eee;
    cursor: pointer; transition: transform .2s; position: relative;
}
.swatch-color.selected::after {
    content: ''; position: absolute; top: -4px; right: -4px; bottom: -4px; left: -4px;
    border: 1px solid #111; border-radius: 50%;
}
.swatch-size {
    min-width: 42px; height: 34px; border: 1px solid #eee;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; cursor: pointer; transition: all .2s;
}
.swatch-size.selected { background: #000; color: #fff; border-color: #000 }

/* === INLINE SEARCH === */
.inline-search-wrap { margin-bottom: 40px; width: 100% }
.inline-search-box {
    position: relative; display: flex; align-items: center;
    border-bottom: 1.5px solid #eee; padding: 12px 0; transition: border-color 0.4s;
}
.inline-search-box:focus-within { border-color: var(--color-text) }
.inline-search-box input {
    width: 100%; border: none; outline: none; font-family: var(--font-body);
    font-size: 14px; letter-spacing: 0.5px; background: transparent;
    padding-right: 40px; color: var(--color-text);
}
.inline-search-box input::placeholder {
    color: #999; text-transform: uppercase; font-size: 11px; letter-spacing: 1.5px;
}
.inline-search-box svg {
    position: absolute; right: 0; opacity: 0.6; pointer-events: none;
    stroke: var(--color-text); transition: opacity 0.3s;
}
.inline-search-box:focus-within svg { opacity: 1 }

/* === PRODUCT GRID === */
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 24px }

/* === SHOP PRODUCT CARD OVERRIDES === */
.product-card { position: relative }
.product-card .img-wrap {
    position: relative; background: #fff; aspect-ratio: 3/4;
    overflow: hidden; border-radius: 4px; cursor: pointer; display: block;
}
.product-card .img-wrap::before {
    content: ''; position: absolute; inset: 0;
    transition: background .5s ease; z-index: 1; pointer-events: none;
}
.product-card:hover .img-wrap::before {
    background-color: rgba(0, 0, 0, 0.397) !important; opacity: 1 !important;
}
.product-card .img-wrap img {
    width: 100%; height: 100%; object-fit: contain;
    transition: all .5s !important; position: relative; z-index: 1;
    will-change: transform, opacity;
}
.product-card .img-wrap img.incoming {
    position: absolute; top: 0; left: 0; opacity: 0;
    z-index: 2; transform: scale(1.08);
}
.product-card .img-wrap::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0); transition: background 0.5s ease;
    z-index: 2; pointer-events: none;
}
.product-card:hover .img-wrap::after { background: rgba(0, 0, 0, 0.12) }
.product-card .img-wrap.loading::after {
    background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(2px); pointer-events: none;
}

/* Badge overrides for shop */
.product-card .badge {
    position: absolute; top: 12px; left: 12px; padding: 6px 12px;
    font-size: 9px; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; z-index: 10;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(4px);
    color: var(--color-text); transition: none !important;
}
.badge-sale { color: #c0392b !important }
.badge-new { color: var(--color-text) }
.badge-best { color: var(--color-gold) !important }

/* Quick buy & view details positioning for shop grid */
.product-card .quick-buy {
    position: absolute; top: 45%; left: 50%;
    transform: translate(-50%, -10%); opacity: 0;
    background: rgba(255, 255, 255, 0.95); color: var(--color-text);
    border-radius: 30px; letter-spacing: 1.5px; text-transform: uppercase;
    font-weight: 600; transition: all .4s cubic-bezier(.25, 1, .25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, .1); white-space: nowrap;
    z-index: 11; backdrop-filter: blur(8px);
    border: 0.5px solid rgba(255, 255, 255, 0.3); cursor: pointer;
    padding: 10px 24px; min-width: 168px; font-size: 10px; text-align: center;
}
.img-wrap:hover .quick-buy { transform: translate(-50%, -50%); opacity: 1 }
.product-card .quick-buy:hover { background: var(--color-text); color: #fff }
.product-card .view-details-btn {
    position: absolute; top: 55%; left: 50%;
    transform: translate(-50%, -10%); opacity: 0;
    background: rgba(0, 0, 0, 0.85); min-width: 168px; color: #fff;
    padding: 10px 24px; border-radius: 30px; font-size: 10px;
    letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
    transition: all .4s cubic-bezier(.25, 1, .25, 1); transition-delay: 0.06s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .15); white-space: nowrap;
    z-index: 11; backdrop-filter: blur(8px);
    border: 0.5px solid rgba(255, 255, 255, 0.2); cursor: pointer;
    text-decoration: none; display: inline-block; text-align: center;
}
.img-wrap:hover .view-details-btn { transform: translate(-50%, -50%); opacity: 1 }
.product-card .view-details-btn:hover { background: rgba(255, 255, 255, 0.95); color: var(--color-text) }

/* Product info */
.product-info { padding: 16px 8px 8px; text-align: center }
.product-name {
    font-family: var(--font-body); font-size: 12.5px; font-weight: 400;
    letter-spacing: 0.5px; line-height: 1.5; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; color: #222; transition: color .3s;
}
.product-card:hover .product-name { color: var(--color-gold) }
.product-price {
    display: flex; justify-content: center; align-items: center;
    gap: 10px; font-size: 13.5px; font-family: var(--font-body);
}
.price-sale { font-weight: 600; color: #c0392b }
.price-orig { font-size: 12px; color: #a0a0a0; text-decoration: line-through }
.price-regular { font-weight: 500; color: #111 }
.product-card a:hover { opacity: 1 }

/* Stagger animation for cards */
.product-card { opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.5s }
.product-card.animate-in { opacity: 1; transform: translateY(0) }

/* === SORT & TOP BAR === */
.shop-top-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.sort-box {
    display: flex; align-items: center; gap: 12px;
    font-size: 13px; text-transform: uppercase; color: #555; letter-spacing: 1px;
}
.sort-box select {
    padding: 10px 14px; border: 1px solid #ddd; font-family: var(--font-body);
    font-size: 13px; outline: none; background: #fff; cursor: pointer;
    transition: border-color 0.2s;
}
.sort-box select:hover { border-color: #111 }

/* === ACTIVE FILTER TAGS === */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.active-filter-tag {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    background: #f4f4f4; font-size: 11px; letter-spacing: 1px;
    text-transform: uppercase; cursor: pointer; transition: background 0.2s;
}
.active-filter-tag:hover { background: #e0e0e0 }
.active-filter-tag .remove-tag { font-weight: 700; font-size: 14px }
.clear-all-btn {
    font-size: 11px; text-decoration: underline; color: #888;
    cursor: pointer; letter-spacing: 1px; text-transform: uppercase;
}
.clear-all-btn:hover { color: #111 }

/* === EMPTY STATE === */
#emptyState {
    text-align: center; padding: 80px 20px; color: #888;
}
#emptyState h3 { font-family: var(--font-heading); font-size: 24px; margin-bottom: 12px; color: #333 }
#emptyState p { font-size: 14px }

/* === MOBILE FILTER === */
.sidebar-close-btn {
    display: none; text-align: right; margin-bottom: 20px;
    cursor: pointer; font-size: 24px;
}
.mobile-filter-bar {
    display: none; padding: 16px 24px; border-bottom: 1px solid #eee;
    justify-content: space-between; align-items: center;
    position: sticky; top: 60px; background: #fff; z-index: 900;
}
.mobile-filter-btn {
    display: flex; align-items: center; gap: 10px; font-size: 11px;
    font-weight: 600; letter-spacing: 1.5px; border: 1px solid #111;
    padding: 10px 24px; text-transform: uppercase; cursor: pointer; background: transparent;
}

/* === SHOP RESPONSIVE === */
@media (max-width: 1024px) {
    .mobile-filter-bar { display: flex }
    .shop-layout { display: block }
    .shop-sidebar {
        position: fixed; top: 0; left: 0; width: 100%; max-width: 360px;
        height: 100%; background: #fff; z-index: 5000; padding: 60px 24px;
        transform: translateX(-100%); overflow-y: auto;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    }
    .shop-sidebar.open { transform: translateX(0) }
    .sidebar-close-btn { display: block }
    .shop-grid { grid-template-columns: 1fr 1fr; gap: 20px }
    .product-card .quick-buy,
    .product-card .view-details-btn { display: none !important }
}
@media (max-width: 992px) {
    .shop-layout { flex-direction: column; gap: 30px }
    .shop-sidebar { width: 100%; position: static; border: 1px solid #eee; padding: 10px 20px; background: #fff }
    .filter-group { border-bottom: none; padding: 10px 0 }
    .filter-content { padding: 10px 0 }
}
@media (max-width: 768px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px }
}
@media (max-width: 480px) {
    .shop-grid { grid-template-columns: 1fr }
}
