/* ═══════════════════════════════════════════════════
   PRODUITS PREMIUM — AMAZON/ALIEXPRESS INSPIRED
═══════════════════════════════════════════════════ */

/* === PAGE WRAPPER === */
.prem-page {
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Remove theme white background wrappers on this page */
.page-template-template-produits .entry-content,
.page-template-template-produits article,
.page-template-template-produits .radios-main-page-wrapper,
.page-template-template-produits .post-thumbnail {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* === TOP SEARCH BAR === */
.prem-topbar {
    background: #131921;
    padding: 12px 0;
    margin-bottom: 0;
}
.prem-topbar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.prem-search-wrap {
    flex: 1;
    min-width: 280px;
}
.prem-search-form {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.prem-search-cat {
    background: #e8e8e8;
    border: none;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    border-right: 1px solid #ccc;
    max-width: 160px;
    outline: none;
}
.prem-search-input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
    color: #333;
}
.prem-search-btn {
    background: #f97316;
    border: none;
    padding: 0 20px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background .2s;
}
.prem-search-btn:hover { background: #ea580c; }
.prem-topbar-meta { color: #ccc; font-size: 13px; white-space: nowrap; }

/* === CATEGORY PILLS BAR === */
.prem-cats-bar {
    background: #232f3e;
    padding: 10px 0;
    margin-bottom: 20px;
    overflow: hidden;
}
.prem-cats-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.prem-cats-scroll::-webkit-scrollbar { display: none; }
.prem-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all .2s;
    flex-shrink: 0;
}
.prem-cat-pill:hover {
    color: #fff;
    border-color: #f97316;
    background: rgba(249,115,22,.15);
}
.prem-cat-pill.active {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
}
.prem-cat-pill img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.prem-cat-count {
    background: rgba(255,255,255,.2);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
}

/* === LAYOUT === */
.prem-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
    padding-top: 4px;
}

/* === SIDEBAR === */
.prem-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    overflow: hidden;
    position: sticky;
    top: 20px;
}
.prem-sidebar-header {
    background: #131921;
    color: #fff;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.prem-clear-all {
    margin-left: auto;
    color: #f97316;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.prem-clear-all:hover { text-decoration: underline; color: #f97316; }

.prem-filter-section {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
}
.prem-filter-title {
    font-size: 13px;
    font-weight: 700;
    color: #131921;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.prem-filter-title i { color: #f97316; }

.prem-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.prem-filter-list li { margin-bottom: 4px; }

.prem-filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    font-size: 14px;
    color: #4a5568;
}
.prem-filter-label:hover { background: #fef3e8; color: #f97316; }
.prem-filter-label.checked { background: #fef3e8; color: #f97316; font-weight: 600; }
.prem-filter-label input[type="radio"] { display: none; }

.prem-radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all .2s;
    position: relative;
}
.prem-filter-label.checked .prem-radio-custom {
    border-color: #f97316;
    background: #f97316;
    box-shadow: inset 0 0 0 3px #fff;
}
.prem-filter-name { flex: 1; }
.prem-filter-count {
    background: #f0f2f5;
    color: #718096;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}
.prem-filter-label.checked .prem-filter-count {
    background: rgba(249,115,22,.15);
    color: #f97316;
}
.prem-in-stock-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Price inputs */
.prem-price-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}
.prem-price-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.prem-price-field label {
    font-size: 11px;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
}
.prem-price-field input {
    width: 100%;
    padding: 9px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    outline: none;
    transition: border-color .2s;
}
.prem-price-field input:focus { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,.1); }
.prem-price-dash { color: #a0aec0; font-weight: 700; padding-bottom: 10px; }

.prem-price-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.prem-price-shortcut {
    padding: 5px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    background: #fff;
    cursor: pointer;
    transition: all .2s;
}
.prem-price-shortcut:hover,
.prem-price-shortcut.active {
    border-color: #f97316;
    color: #f97316;
    background: #fef3e8;
}

.prem-apply-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 16px 20px 20px;
    padding: 13px;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.prem-apply-btn:hover { background: #ea580c; box-shadow: 0 4px 16px rgba(249,115,22,.3); }

/* === MAIN CONTENT === */
.prem-main { min-width: 0; }

/* === TOOLBAR === */
.prem-toolbar {
    background: transparent;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.prem-toolbar-left { display: flex; align-items: center; gap: 12px; }
.prem-toolbar-right { display: flex; align-items: center; gap: 12px; }

.prem-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #131921;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}
.prem-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #f97316;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prem-showing { font-size: 14px; color: #4a5568; }
.prem-showing strong { color: #1a202c; }

.prem-sort-form { display: flex; align-items: center; gap: 8px; }
.prem-sort-label { font-size: 13px; color: #718096; font-weight: 600; white-space: nowrap; }
.prem-sort-select {
    padding: 8px 32px 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1a202c;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path fill="%23f97316" d="M5 6L0 0h10z"/></svg>') no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
    outline: none;
}
.prem-sort-select:focus { border-color: #f97316; }

.prem-view-toggle { display: flex; gap: 4px; }
.prem-view-btn {
    width: 34px;
    height: 34px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #718096;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prem-view-btn.active,
.prem-view-btn:hover { background: #f97316; color: #fff; border-color: #f97316; }

/* === ACTIVE FILTERS === */
.prem-active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 0;
}
.prem-active-label { font-size: 13px; font-weight: 700; color: #4a5568; }
.prem-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #fef3e8;
    color: #f97316;
    border: 1px solid #fed7aa;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.prem-active-tag:hover { background: #f97316; color: #fff; border-color: #f97316; }
.prem-clear-filters {
    margin-left: auto;
    font-size: 13px;
    color: #ef4444;
    font-weight: 600;
    text-decoration: none;
}
.prem-clear-filters:hover { text-decoration: underline; color: #ef4444; }

/* === PRODUCT GRID === */
.prem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    background: transparent;
}
.prem-view-list {
    grid-template-columns: 1fr;
}

/* === PRODUCT CARD === */
.prem-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border: 1.5px solid #f0f2f5;
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.prem-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    border-color: #f97316;
    transform: translateY(-4px);
}

/* Card image */
.prem-card-img {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    padding-top: 100%;
}
.prem-card-img a {
    position: absolute;
    inset: 0;
    display: block;
}
.prem-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.prem-card:hover .prem-card-img img { transform: scale(1.08); }

/* Badges */
.prem-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.prem-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;
}
.prem-badge-sale { background: #ef4444; color: #fff; }
.prem-badge-new { background: #22c55e; color: #fff; }
.prem-badge-hot { background: #f97316; color: #fff; }

/* Quick actions */
.prem-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
    opacity: 0;
    transform: translateX(10px);
    transition: all .3s ease;
}
.prem-card:hover .prem-card-actions {
    opacity: 1;
    transform: translateX(0);
}
.prem-action-btn {
    width: 36px !important;
    height: 36px !important;
    background: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.15) !important;
    color: #4a5568 !important;
    text-decoration: none !important;
    transition: all .2s !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.prem-action-btn svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    flex-shrink: 0 !important;
    pointer-events: none !important;
}
.prem-action-btn:hover svg {
    stroke: #fff !important;
}
.prem-action-btn:hover {
    background: #f97316 !important;
    color: #fff !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(249,115,22,.3) !important;
}
.prem-wishlist-btn.added {
    background: #f97316 !important;
    color: #fff !important;
}
.prem-wishlist-btn.added svg {
    fill: #fff !important;
    stroke: #fff !important;
}
.prem-wishlist-btn.loading {
    opacity: .6 !important;
    cursor: wait !important;
}

/* Card body */
.prem-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.prem-card-cat {
    font-size: 11px;
    font-weight: 700;
    color: #f97316;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 5px;
}
.prem-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    flex: 1;
}
.prem-card-title a { color: #1a202c; text-decoration: none; }
.prem-card-title a:hover { color: #f97316; }

/* Rating */
.prem-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}
.prem-stars { display: flex; gap: 2px; }
.prem-stars i { font-size: 11px; color: #f59e0b; }
.prem-rating-val { font-size: 12px; font-weight: 700; color: #f59e0b; }
.prem-rating-count { font-size: 11px; color: #a0aec0; }

/* Price */
.prem-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.prem-price-current {
    font-size: 18px;
    font-weight: 800;
    color: #f97316;
}
.prem-price-current .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; color: inherit; }
.prem-price-old {
    font-size: 13px;
    color: #a0aec0;
    text-decoration: line-through;
    font-weight: 500;
}
.prem-price-old .woocommerce-Price-amount { font-size: inherit; color: inherit; }

/* Stock */
.prem-stock-status {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.prem-stock-status.in-stock { color: #22c55e; }
.prem-stock-status.out-stock { color: #ef4444; }

/* Add to cart */
.prem-card-footer { margin-top: auto; }
.prem-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
}
.prem-add-cart:hover { background: #ea580c; color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,.3); }
.prem-add-cart-disabled { background: #e2e8f0; color: #718096; }
.prem-add-cart-disabled:hover { background: #cbd5e0; color: #718096; box-shadow: none; }

/* === LIST VIEW === */
.prem-view-list .prem-card {
    flex-direction: row;
    height: auto;
}
.prem-view-list .prem-card-img {
    width: 200px;
    min-width: 200px;
    padding-top: 0;
    height: 200px;
}
.prem-view-list .prem-card-img a { position: relative; display: block; height: 100%; }
.prem-view-list .prem-card-img img { position: relative; height: 100%; }
.prem-view-list .prem-card-body { padding: 20px; }
.prem-view-list .prem-card-title { -webkit-line-clamp: 3; min-height: auto; font-size: 16px; }
.prem-view-list .prem-price-current { font-size: 22px; }
.prem-view-list .prem-add-cart { width: auto; padding: 10px 24px; }

/* === PAGINATION === */
.prem-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}
.prem-pagination .page-numbers { display: inline-flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.prem-pagination li { display: inline-block; }
.prem-pagination a,
.prem-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    background: #fff;
    color: #4a5568;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.prem-pagination a:hover { background: #f97316; color: #fff; border-color: #f97316; transform: translateY(-2px); }
.prem-pagination .current { background: #f97316; color: #fff; border-color: #f97316; }
.prem-pagination .dots { border: none; background: transparent; box-shadow: none; }

/* === EMPTY STATE === */
.prem-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.prem-empty-icon { font-size: 64px; color: #cbd5e0; margin-bottom: 20px; }
.prem-empty h3 { font-size: 22px; font-weight: 700; color: #1a202c; margin-bottom: 10px; }
.prem-empty p { color: #718096; margin-bottom: 24px; }
.prem-empty-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #f97316;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all .2s;
}
.prem-empty-btn:hover { background: #ea580c; color: #fff; }

/* === MOBILE OVERLAY === */
.prem-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 998;
}
.prem-overlay.active { display: block; }

/* === RESPONSIVE === */
@media (max-width: 1199px) {
    .prem-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .prem-layout { grid-template-columns: 1fr; }
    .prem-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        overflow-y: auto;
        z-index: 999;
        border-radius: 0;
        transition: left .3s ease;
    }
    .prem-sidebar.open { left: 0; }
    .prem-mobile-filter-btn { display: flex; }
    .prem-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .prem-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .prem-search-cat { display: none; }
    .prem-topbar-meta { display: none; }
    .prem-cats-bar { display: none; }
    .prem-sort-label { display: none; }
    .prem-view-toggle { display: none; }
    .prem-card-title { font-size: 13px; }
    .prem-price-current { font-size: 15px; }
    .prem-add-cart { font-size: 12px; padding: 9px 8px; }
    .prem-view-list .prem-card { flex-direction: column; }
    .prem-view-list .prem-card-img { width: 100%; height: auto; padding-top: 80%; }
}

@media (max-width: 480px) {
    .prem-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .prem-card-body { padding: 10px; }
}
