/* ============================================================
   EnterprisePrint — WooCommerce Shop Stylesheet
   Design Language: Flat, utility-first, high information density
   Version: 1.0.0
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
    --ep-navy:          #0F2537;
    --ep-teal:          #0A6B74;
    --ep-teal-dark:     #08565D;
    --ep-green:         #167E43;
    --ep-green-bg:      rgba(22, 126, 67, 0.08);
    --ep-green-border:  rgba(22, 126, 67, 0.25);
    --ep-amber:         #D97706;
    --ep-amber-bg:      rgba(217, 119, 6, 0.08);
    --ep-amber-border:  rgba(217, 119, 6, 0.25);
    --ep-red:           #DC2626;
    --ep-red-bg:        rgba(220, 38, 38, 0.06);
    --ep-red-border:    rgba(220, 38, 38, 0.2);
    --ep-slate:         #F8FAFC;
    --ep-slate-dark:    #EEF2F6;
    --ep-white:         #FFFFFF;
    --ep-border:        #D1D9E0;
    --ep-border-dark:   #B8C4CE;
    --ep-text:          #1A2733;
    --ep-text-soft:     #3D5166;
    --ep-muted:         #6B7A8A;
    --ep-font:          Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ep-radius:        4px;
    --ep-max-w:         1440px;
    --ep-sidebar-w:     272px;
    --ep-gap:           24px;
}

/* ── Base Reset ─────────────────────────────────────────────── */
.ep-shop-page *,
.ep-shop-page *::before,
.ep-shop-page *::after,
.ep-single-page *,
.ep-single-page *::before,
.ep-single-page *::after {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   SHOP PAGE LAYOUT
═══════════════════════════════════════════════════════════════ */

.ep-shop-page {
    background: var(--ep-slate);
    padding: 24px 0 48px;
    min-height: 60vh;
    font-family: var(--ep-font);
}

.ep-shop-container {
    max-width: var(--ep-max-w);
    margin: 0 auto;
    padding: 0 var(--ep-gap);
    display: grid;
    grid-template-columns: var(--ep-sidebar-w) 1fr;
    gap: var(--ep-gap);
    align-items: start;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */

.ep-sidebar {
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.ep-sidebar-header {
    background: var(--ep-navy);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ep-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ep-white);
    font-family: var(--ep-font);
}

.ep-clear-all {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-family: var(--ep-font);
    transition: color 0.15s;
}

.ep-clear-all:hover {
    color: var(--ep-white);
    text-decoration: underline;
}

/* ── Filter Sections ──────────────────────────────────────── */

.ep-filter-section {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ep-border);
}

.ep-filter-section:last-child {
    border-bottom: none;
}

.ep-filter-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ep-navy);
    margin: 0 0 10px;
    padding: 0;
    font-family: var(--ep-font);
    border: none;
}

/* Widget wrapper from sidebar registration */
.ep-filter-section.ep-widget {
    padding: 14px 16px;
}

/* ── Price Filter ─────────────────────────────────────────── */

.ep-price-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ep-price-input {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    font-size: 13px;
    font-family: var(--ep-font);
    color: var(--ep-text);
    -moz-appearance: textfield;
}

.ep-price-input::-webkit-outer-spin-button,
.ep-price-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.ep-price-input:focus {
    outline: 2px solid var(--ep-teal);
    outline-offset: -1px;
    border-color: var(--ep-teal);
}

.ep-price-sep {
    color: var(--ep-muted);
    font-size: 13px;
}

.ep-filter-apply-btn {
    padding: 6px 12px;
    background: var(--ep-teal);
    color: var(--ep-white);
    border: none;
    border-radius: var(--ep-radius);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--ep-font);
    cursor: pointer;
}

.ep-filter-apply-btn:hover {
    background: var(--ep-teal-dark);
}

/* ── Filter Search (printer model) ───────────────────────── */

.ep-filter-search-wrap {
    margin-bottom: 8px;
}

.ep-filter-search {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    font-size: 12px;
    font-family: var(--ep-font);
    color: var(--ep-text);
}

.ep-filter-search:focus {
    outline: 2px solid var(--ep-teal);
    outline-offset: -1px;
    border-color: var(--ep-teal);
}

/* ── Filter List ──────────────────────────────────────────── */

.ep-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-filter-list--scroll {
    max-height: 220px;
    overflow-y: auto;
}

.ep-filter-item + .ep-filter-item {
    border-top: 1px solid var(--ep-slate-dark);
}

.ep-filter-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--ep-text-soft);
    text-decoration: none;
    font-family: var(--ep-font);
    line-height: 1.3;
}

.ep-filter-link:hover {
    color: var(--ep-teal);
}

.ep-filter-item--active .ep-filter-link {
    color: var(--ep-teal);
    font-weight: 600;
}

.ep-filter-count {
    font-size: 11px;
    color: var(--ep-muted);
    margin-left: auto;
    flex-shrink: 0;
}

/* Checkbox-style filter */
.ep-check-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--ep-border);
    border-radius: 2px;
    background: var(--ep-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--ep-teal);
    flex-shrink: 0;
}

.ep-filter-item--active .ep-check-box {
    background: var(--ep-teal);
    border-color: var(--ep-teal);
    color: var(--ep-white);
}

/* Colour swatch */
.ep-colour-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    display: inline-block;
}

/* ── Availability Toggle ──────────────────────────────────── */

.ep-filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--ep-text-soft);
    font-family: var(--ep-font);
    cursor: pointer;
    user-select: none;
}

.ep-filter-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ep-toggle-track {
    width: 34px;
    height: 18px;
    background: var(--ep-border);
    border-radius: 9px;
    border: 1px solid var(--ep-border-dark);
    display: inline-flex;
    align-items: center;
    padding: 2px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.ep-toggle-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ep-white);
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ep-filter-toggle input:checked ~ .ep-toggle-track {
    background: var(--ep-teal);
    border-color: var(--ep-teal);
}

.ep-filter-toggle input:checked ~ .ep-toggle-track .ep-toggle-thumb {
    transform: translateX(16px);
}

/* Sidebar close button (mobile) */
.ep-sidebar-close {
    display: none;
    width: 100%;
    padding: 12px;
    background: var(--ep-slate);
    border: none;
    border-top: 1px solid var(--ep-border);
    font-size: 13px;
    font-family: var(--ep-font);
    color: var(--ep-text-soft);
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   SHOP TOOLBAR
═══════════════════════════════════════════════════════════════ */

.ep-shop-main {
    min-width: 0;
}

.ep-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    margin-bottom: 12px;
}

.ep-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ep-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    background: var(--ep-slate);
    color: var(--ep-text);
    font-size: 13px;
    font-family: var(--ep-font);
    font-weight: 500;
    cursor: pointer;
}

.ep-mobile-filter-btn:hover {
    border-color: var(--ep-border-dark);
    background: var(--ep-slate-dark);
}

/* Override WooCommerce result count */
.ep-shop-toolbar .woocommerce-result-count {
    font-size: 13px;
    color: var(--ep-muted);
    font-family: var(--ep-font);
    margin: 0;
}

/* Override WooCommerce ordering */
.ep-shop-toolbar .woocommerce-ordering {
    margin: 0;
}

.ep-shop-toolbar .woocommerce-ordering select {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    font-family: var(--ep-font);
    color: var(--ep-text);
    background: var(--ep-white);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7A8A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

/* ── Active Filter Tags ────────────────────────────────────── */

.ep-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.ep-active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 10px;
    background: rgba(10, 107, 116, 0.08);
    border: 1px solid rgba(10, 107, 116, 0.25);
    border-radius: 20px;
    font-size: 12px;
    color: var(--ep-teal);
    font-family: var(--ep-font);
    text-decoration: none;
}

.ep-active-filter-tag:hover {
    background: rgba(10, 107, 116, 0.15);
}

.ep-tag-remove {
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT LOOP + CARDS
═══════════════════════════════════════════════════════════════ */

/* ── Nuclear WooCommerce column override ──────────────────────
   WC adds .columns-3 etc and floats li.product at 30% width.
   Everything here uses !important to beat WC's specificity.   */

.woocommerce .ep-shop-main ul.products,
.woocommerce-page .ep-shop-main ul.products,
.ep-shop-main ul.products,
.ep-shop-main ul.products.columns-1,
.ep-shop-main ul.products.columns-2,
.ep-shop-main ul.products.columns-3,
.ep-shop-main ul.products.columns-4,
.ep-shop-main ul.products.columns-5 {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    grid-template-columns: none !important;
}

/* Beat WC's float + percentage-width on li.product */
.woocommerce .ep-shop-main ul.products li.product,
.woocommerce-page .ep-shop-main ul.products li.product,
.ep-shop-main ul.products li.product,
.ep-shop-main ul.products li.product.ep-product-card {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
}

/* ── Product Card: Horizontal Grid-Table Layout ───────────── */

.ep-product-card {
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    display: grid !important;
    grid-template-columns: 72px 1fr 130px 150px 110px 190px;
    align-items: stretch;
    overflow: hidden;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    transition: border-color 0.15s;
    box-sizing: border-box;
    width: 100% !important;
}

.ep-product-card:hover {
    border-color: var(--ep-teal);
}

/* Shared cell padding */
.ep-card-thumb,
.ep-card-info,
.ep-card-specs,
.ep-card-pricing,
.ep-card-stock,
.ep-card-order {
    padding: 12px;
}

/* Dividers between cells */
.ep-card-thumb,
.ep-card-info,
.ep-card-specs,
.ep-card-pricing,
.ep-card-stock {
    border-right: 1px solid var(--ep-border);
}

/* ── Thumbnail ────────────────────────────────────────────── */

.ep-card-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ep-slate);
    padding: 8px;
}

.ep-card-thumb a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ep-thumb-img,
.ep-card-thumb img {
    width: 56px !important;
    height: 56px !important;
    object-fit: contain;
    display: block;
}

/* ── Info ─────────────────────────────────────────────────── */

.ep-card-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

/* ── Badges ───────────────────────────────────────────────── */

.ep-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.ep-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--ep-font);
    line-height: 1.6;
    white-space: nowrap;
}

.ep-badge--oem {
    background: var(--ep-navy);
    color: var(--ep-white);
}

.ep-badge--compatible {
    background: #E8F4FD;
    color: #1A5276;
    border: 1px solid #AED6F1;
}

.ep-badge--contract {
    background: rgba(10, 107, 116, 0.08);
    color: var(--ep-teal);
    border: 1px solid rgba(10, 107, 116, 0.25);
}

/* ── Product Name & SKU ───────────────────────────────────── */

.ep-product-name,
.ep-product-card > .ep-card-info a.ep-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ep-navy);
    text-decoration: none;
    display: block;
    line-height: 1.3;
    font-family: var(--ep-font);
}

.ep-product-name:hover {
    color: var(--ep-teal);
}

.ep-sku {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ep-muted);
    font-family: var(--ep-font);
    display: block;
}

/* ── Attribute Rows ───────────────────────────────────────── */

.ep-attr-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 5px;
}

.ep-attr-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ep-muted);
    font-family: var(--ep-font);
}

.ep-attr-value {
    font-size: 12px;
    color: var(--ep-text-soft);
    font-family: var(--ep-font);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-attr-value--models {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ep-colour-pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    display: inline-block;
    flex-shrink: 0;
}

/* ── Specs ────────────────────────────────────────────────── */

.ep-card-specs {
    background: var(--ep-slate);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.ep-spec-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ep-spec-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ep-muted);
    font-family: var(--ep-font);
}

.ep-spec-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--ep-navy);
    font-family: var(--ep-font);
    line-height: 1.2;
}

/* ── Pricing ──────────────────────────────────────────────── */

.ep-card-pricing {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.ep-unit-price {
    font-family: var(--ep-font);
}

.ep-unit-price .woocommerce-Price-amount,
.ep-unit-price .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--ep-navy);
    font-family: var(--ep-font);
}

.ep-unit-price del {
    font-size: 13px;
    color: var(--ep-muted);
    font-weight: 400;
}

.ep-unit-price ins {
    text-decoration: none;
    color: var(--ep-green);
}

/* Tier table */
.ep-tier-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ep-font);
    font-size: 11px;
}

.ep-tier-table th {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ep-muted);
    text-align: left;
    padding: 3px 4px;
    border-bottom: 1px solid var(--ep-border);
}

.ep-tier-table td {
    padding: 3px 4px;
    color: var(--ep-text-soft);
}

.ep-tier-table tr:hover td {
    color: var(--ep-teal);
}

/* ── Stock Badge ──────────────────────────────────────────── */

.ep-card-stock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--ep-slate);
    text-align: center;
}

.ep-stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--ep-font);
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
}

.ep-stock-badge--in {
    background: var(--ep-green-bg);
    color: var(--ep-green);
    border: 1px solid var(--ep-green-border);
}

.ep-stock-badge--out {
    background: var(--ep-red-bg);
    color: var(--ep-red);
    border: 1px solid var(--ep-red-border);
}

.ep-stock-badge--backorder {
    background: var(--ep-amber-bg);
    color: var(--ep-amber);
    border: 1px solid var(--ep-amber-border);
}

/* ── Order Pad ────────────────────────────────────────────── */

.ep-card-order {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
}

/* Quantity controls */
.ep-qty-controls {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
    height: 36px;
}

.ep-qty-btn {
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ep-slate);
    border: none;
    cursor: pointer;
    color: var(--ep-navy);
    flex-shrink: 0;
    transition: background 0.15s;
}

.ep-qty-btn:hover {
    background: var(--ep-slate-dark);
}

.ep-qty-btn:active {
    background: var(--ep-border);
}

.ep-qty-input {
    flex: 1;
    min-width: 0;
    border: none;
    border-left: 1px solid var(--ep-border);
    border-right: 1px solid var(--ep-border);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--ep-font);
    color: var(--ep-navy);
    background: var(--ep-white);
    padding: 0;
    -moz-appearance: textfield;
}

.ep-qty-input::-webkit-outer-spin-button,
.ep-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.ep-qty-input:focus {
    outline: none;
    background: #F0F8FF;
}

/* Add to Order button */
.ep-order-btn {
    width: 100%;
    padding: 9px 12px;
    background: var(--ep-teal);
    color: var(--ep-white);
    border: none;
    border-radius: var(--ep-radius);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--ep-font);
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
    letter-spacing: 0.01em;
    line-height: 1;
}

.ep-order-btn:hover {
    background: var(--ep-teal-dark);
}

.ep-order-btn.ep-btn--loading {
    opacity: 0.65;
    cursor: wait;
}

.ep-order-btn.ep-btn--added {
    background: var(--ep-green);
}

.ep-order-btn:focus-visible {
    outline: 2px solid var(--ep-teal);
    outline-offset: 2px;
}

/* Other states */
.ep-select-options-btn,
.ep-view-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    color: var(--ep-teal);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--ep-font);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    background: var(--ep-white);
    transition: border-color 0.15s, color 0.15s;
}

.ep-select-options-btn:hover,
.ep-view-btn:hover {
    border-color: var(--ep-teal);
    color: var(--ep-teal-dark);
}

.ep-out-of-stock-msg {
    font-size: 12px;
    color: var(--ep-muted);
    text-align: center;
    font-family: var(--ep-font);
    display: block;
    margin-bottom: 4px;
}

/* ── Pagination ───────────────────────────────────────────── */

.ep-pagination {
    margin-top: 20px;
}

.ep-pagination .woocommerce-pagination {
    display: flex;
    justify-content: center;
}

.ep-pagination ul.page-numbers {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ep-pagination .page-numbers a,
.ep-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    font-size: 13px;
    font-family: var(--ep-font);
    color: var(--ep-text-soft);
    text-decoration: none;
    background: var(--ep-white);
    transition: border-color 0.15s, color 0.15s;
}

.ep-pagination .page-numbers a:hover {
    border-color: var(--ep-teal);
    color: var(--ep-teal);
}

.ep-pagination .page-numbers .current {
    background: var(--ep-navy);
    border-color: var(--ep-navy);
    color: var(--ep-white);
}

/* No products */
.ep-no-products {
    padding: 48px;
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    text-align: center;
    font-family: var(--ep-font);
    color: var(--ep-muted);
}

/* ═══════════════════════════════════════════════════════════════
   SINGLE PRODUCT PAGE
═══════════════════════════════════════════════════════════════ */

.ep-single-page {
    background: var(--ep-slate);
    padding: 24px 0 48px;
    min-height: 60vh;
    font-family: var(--ep-font);
}

.ep-single-container {
    max-width: var(--ep-max-w);
    margin: 0 auto;
    padding: 0 var(--ep-gap);
}

.ep-breadcrumb {
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--ep-muted);
}

.ep-breadcrumb .woocommerce-breadcrumb {
    font-size: 12px;
    color: var(--ep-muted);
    font-family: var(--ep-font);
}

.ep-breadcrumb .woocommerce-breadcrumb a {
    color: var(--ep-teal);
    text-decoration: none;
}

.ep-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ep-teal);
    text-decoration: none;
    font-family: var(--ep-font);
    margin-bottom: 20px;
    font-weight: 500;
}

.ep-back-link:hover {
    text-decoration: underline;
}

/* ── Single Product Layout ────────────────────────────────── */

.ep-single-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: var(--ep-gap);
    margin-bottom: 32px;
    align-items: start;
}

/* Gallery */
.ep-single-gallery {
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
}

.ep-single-gallery .woocommerce-product-gallery {
    margin: 0;
}

/* Summary */
.ep-single-summary {
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    padding: 24px;
}

.ep-single-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ep-navy);
    font-family: var(--ep-font);
    margin: 8px 0 4px;
    line-height: 1.25;
}

/* Price on single */
.ep-single-price {
    margin: 12px 0;
    padding: 12px 0;
    border-top: 1px solid var(--ep-border);
    border-bottom: 1px solid var(--ep-border);
}

.ep-single-price .woocommerce-Price-amount,
.ep-single-price p.price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--ep-navy) !important;
    font-family: var(--ep-font) !important;
}

/* Specs panel */
.ep-single-specs-panel {
    margin: 16px 0;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
}

.ep-spec-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--ep-border);
    align-items: center;
}

.ep-spec-row:last-child {
    border-bottom: none;
}

.ep-spec-row:nth-child(even) {
    background: var(--ep-slate);
}

.ep-spec-row-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-muted);
    font-family: var(--ep-font);
}

.ep-spec-row-value {
    font-size: 13px;
    color: var(--ep-text);
    font-family: var(--ep-font);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.ep-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ep-muted);
    font-family: var(--ep-font);
    margin: 0 0 8px;
}

/* Tier table on single */
.ep-tier-table--single {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
}

.ep-tier-table--single th {
    background: var(--ep-slate);
}

.ep-tier-saving {
    color: var(--ep-green) !important;
    font-weight: 600;
}

.ep-single-tiers {
    margin: 12px 0;
    padding: 12px;
    background: var(--ep-slate);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
}

/* EP-styled WC add to cart on single */
.ep-single-add-to-cart .woocommerce-variation-add-to-cart,
.ep-single-add-to-cart form.cart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.ep-single-add-to-cart .quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
    width: fit-content;
}

.ep-single-add-to-cart .qty {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--ep-font);
    color: var(--ep-navy);
    -moz-appearance: textfield;
}

.ep-single-add-to-cart .qty::-webkit-outer-spin-button,
.ep-single-add-to-cart .qty::-webkit-inner-spin-button { -webkit-appearance: none; }

.ep-single-add-to-cart .single_add_to_cart_button {
    padding: 12px 24px;
    background: var(--ep-teal);
    color: var(--ep-white);
    border: none;
    border-radius: var(--ep-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--ep-font);
    cursor: pointer;
    transition: background 0.15s;
    text-transform: none;
    letter-spacing: 0;
}

.ep-single-add-to-cart .single_add_to_cart_button:hover {
    background: var(--ep-teal-dark);
}

/* Tabs on single */
.ep-single-tabs {
    margin-bottom: 32px;
}

.ep-single-tabs .woocommerce-tabs {
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
}

.ep-single-tabs .woocommerce-tabs ul.tabs {
    background: var(--ep-navy);
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.ep-single-tabs .woocommerce-tabs ul.tabs li {
    background: transparent;
    border: none;
    margin: 0;
    border-radius: 0;
}

.ep-single-tabs .woocommerce-tabs ul.tabs li a {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--ep-font);
    font-size: 13px;
    font-weight: 500;
    padding: 12px 20px;
    display: block;
}

.ep-single-tabs .woocommerce-tabs ul.tabs li.active {
    background: transparent;
    border-bottom: 2px solid var(--ep-teal);
}

.ep-single-tabs .woocommerce-tabs ul.tabs li.active a {
    color: var(--ep-white);
}

.ep-single-tabs .woocommerce-tabs .panel {
    padding: 24px;
    font-family: var(--ep-font);
    font-size: 14px;
    color: var(--ep-text);
    line-height: 1.6;
}

/* Related products */
.ep-related-products .related ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    flex-direction: unset;
}

.ep-related-products h2 {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--ep-font);
    color: var(--ep-navy);
    margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */

@media (max-width: 1280px) {
    .ep-product-card {
        grid-template-columns: 72px 1fr 110px 130px 100px 180px;
    }
}

@media (max-width: 1100px) {
    .ep-shop-container {
        grid-template-columns: 240px 1fr;
        --ep-sidebar-w: 240px;
    }

    .ep-product-card {
        grid-template-columns: 72px 1fr 100px 130px 170px;
    }

    /* Hide specs col on medium */
    .ep-card-specs { display: none; }
}

@media (max-width: 900px) {
    .ep-shop-container {
        grid-template-columns: 1fr;
    }

    .ep-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100vh;
        max-height: 100vh;
        z-index: 9999;
        border-radius: 0;
    }

    .ep-sidebar.ep-sidebar--open {
        display: block;
    }

    .ep-sidebar-close {
        display: block;
    }

    .ep-mobile-filter-btn {
        display: inline-flex;
    }

    .ep-single-layout {
        grid-template-columns: 1fr;
    }

    .ep-related-products .related ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ep-product-card {
        grid-template-columns: 64px 1fr;
        grid-template-rows: auto auto auto;
    }

    .ep-card-thumb {
        grid-row: 1 / 3;
        border-right: 1px solid var(--ep-border);
        border-bottom: none;
    }

    .ep-card-info {
        grid-column: 2;
        border-right: none;
        border-bottom: 1px solid var(--ep-border);
    }

    .ep-card-specs { display: none; }

    .ep-card-pricing {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        background: var(--ep-slate);
        border-right: none;
        border-bottom: 1px solid var(--ep-border);
    }

    .ep-card-stock {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
        border-right: none;
        border-bottom: 1px solid var(--ep-border);
        background: var(--ep-white);
        padding: 8px 12px;
    }

    .ep-card-order {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
    }

    .ep-qty-controls {
        flex-shrink: 0;
        width: 110px;
    }

    .ep-order-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .ep-shop-page,
    .ep-single-page {
        padding: 12px 0 32px;
    }

    .ep-shop-container,
    .ep-single-container {
        padding: 0 12px;
        gap: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   WOOCOMMERCE FLOAT CLEARFIX OVERRIDE
   WC uses ::after clearfix on ul.products — disable it so our
   flexbox column layout isn't broken by stray float clearing.
═══════════════════════════════════════════════════════════════ */
.ep-shop-main ul.products::after,
.ep-shop-main ul.products::before {
    content: none !important;
    display: none !important;
    clear: none !important;
}

/* Also kill any WC theme wrapper that re-introduces float grid */
.ep-shop-main .woocommerce-loop-product__link {
    display: block;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   PRINTER MODEL AUTOCOMPLETE
═══════════════════════════════════════════════════════════════ */

.ep-model-search-wrap {
    position: relative;
}

.ep-model-search-input {
    width: 100%;
    padding: 8px 32px 8px 10px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    font-size: 13px;
    font-family: var(--ep-font);
    color: var(--ep-text);
    background: var(--ep-white);
    appearance: none;
    -webkit-appearance: none;
}

.ep-model-search-input:focus {
    outline: 2px solid var(--ep-teal);
    outline-offset: -1px;
    border-color: var(--ep-teal);
}

.ep-model-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ep-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* Dropdown */
.ep-model-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 260px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(15, 37, 55, 0.12);
}

.ep-model-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 13px;
    font-family: var(--ep-font);
    color: var(--ep-text);
    cursor: pointer;
    gap: 8px;
}

.ep-model-option:hover,
.ep-model-option:focus {
    background: var(--ep-slate);
    color: var(--ep-teal);
    outline: none;
}

.ep-model-option--msg {
    color: var(--ep-muted);
    font-style: italic;
    cursor: default;
}

.ep-model-option--msg:hover {
    background: none;
    color: var(--ep-muted);
}

.ep-model-count {
    font-size: 11px;
    color: var(--ep-muted);
    flex-shrink: 0;
}

/* Highlight matched text */
.ep-match {
    background: rgba(10, 107, 116, 0.12);
    color: var(--ep-teal);
    font-weight: 700;
    border-radius: 2px;
    padding: 0 1px;
}

/* Active model tags (shown above search when a filter is active) */
.ep-model-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.ep-model-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(10, 107, 116, 0.08);
    border: 1px solid rgba(10, 107, 116, 0.25);
    border-radius: 20px;
    font-size: 11px;
    color: var(--ep-teal);
    text-decoration: none;
    font-family: var(--ep-font);
    font-weight: 500;
}

.ep-model-tag:hover {
    background: rgba(10, 107, 116, 0.18);
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORY ACCORDION FILTER
═══════════════════════════════════════════════════════════════ */

.ep-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-cat-item {
    border-bottom: 1px solid var(--ep-slate-dark);
}

.ep-cat-item:last-child {
    border-bottom: none;
}

.ep-cat-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ep-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    padding: 7px 0;
    font-size: 13px;
    color: var(--ep-text-soft);
    text-decoration: none;
    font-family: var(--ep-font);
    gap: 6px;
    min-width: 0;
}

.ep-cat-link:hover {
    color: var(--ep-teal);
}

.ep-cat-item--active > .ep-cat-row > .ep-cat-link {
    color: var(--ep-teal);
    font-weight: 700;
}

.ep-cat-count {
    font-size: 11px;
    color: var(--ep-muted);
    flex-shrink: 0;
    margin-left: auto;
}

/* Toggle chevron button */
.ep-cat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--ep-muted);
    border-radius: var(--ep-radius);
    flex-shrink: 0;
    padding: 0;
}

.ep-cat-toggle:hover {
    background: var(--ep-slate-dark);
    color: var(--ep-teal);
}

.ep-chevron {
    transition: transform 0.2s ease;
    display: block;
}

.ep-cat-item--open > .ep-cat-row > .ep-cat-toggle .ep-chevron {
    transform: rotate(180deg);
}

/* Children list */
.ep-cat-children {
    list-style: none;
    margin: 0;
    padding: 0 0 4px 12px;
    border-left: 2px solid var(--ep-teal);
    margin-left: 4px;
    margin-bottom: 6px;
}

.ep-cat-child {
    border: none;
}

.ep-cat-child-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    font-size: 12px;
    color: var(--ep-text-soft);
    text-decoration: none;
    font-family: var(--ep-font);
}

.ep-cat-child-link:hover {
    color: var(--ep-teal);
}

.ep-cat-child--active .ep-cat-child-link {
    color: var(--ep-teal);
    font-weight: 600;
}

.ep-cat-child--active .ep-cat-child-link::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ep-teal);
    flex-shrink: 0;
}

/* Also remove magnifying glass CSS */
.ep-model-search-icon { display: none !important; }
.ep-model-search-input { padding-right: 10px; }
