/* ============================================================
   EFKA Catalogue Layout — Front-end Styles
   Mirrors the EFKA PDF price list visual language:
   – Grey (#808080) + Red (#c0392b) header band
   – Grey price block rows
   – Monospaced SKU column in component table
   – Bottom accessory card strip
   ============================================================ */

/* ---- Variables ---- */
:root {
    --efka-red:          #c0392b;
    --efka-red-dark:     #a93226;
    --efka-grey-dark:    #555555;
    --efka-grey-mid:     #808080;
    --efka-grey-light:   #e8e8e8;
    --efka-grey-bg:      #f4f4f4;
    --efka-text:         #222222;
    --efka-sku-font:     'Courier New', Courier, monospace;
    --efka-border:       #d0d0d0;
    --efka-badge-green:  #2e7d32;
}

/* ---- Outer wrapper ---- */
.efka-catalogue-wrap {
    margin: 0 0 2rem 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--efka-text);
    max-width: 900px;
}

/* ============================================================
   HEADER BAND
   ============================================================ */
.efka-header-band {
    display: flex;
    align-items: stretch;
    min-height: 80px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
}

.efka-header-logo {
    background: var(--efka-grey-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    min-width: 130px;
    flex-shrink: 0;
}

.efka-logo {
    max-height: 52px;
    width: auto;
    display: block;
}

.efka-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-align: center;
}

.efka-logo-text small {
    font-size: .65rem;
    font-weight: 400;
    letter-spacing: .06em;
    display: block;
}

.efka-header-title {
    background: var(--efka-red);
    color: #fff;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.25;
}

/* ============================================================
   SERIES LABEL  (CLASSIC SERIES, etc.)
   ============================================================ */
.efka-series-label {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--efka-text);
    margin: 0 0 1.25rem 0;
    letter-spacing: .01em;
}

/* ============================================================
   PRICE BLOCK
   ============================================================ */
.efka-price-block {
    background: var(--efka-grey-light);
    border: 1px solid var(--efka-border);
    margin-bottom: 1.5rem;
}

.efka-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 14px;
    gap: 1rem;
}

.efka-price-row + .efka-price-row {
    border-top: 1px solid var(--efka-border);
}

.efka-price-row__label {
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.4;
    flex: 1;
}

.efka-price-row--set .efka-price-row__label {
    font-weight: 700;
    font-size: .85rem;
}

.efka-price-row__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--efka-red);
    white-space: nowrap;
    flex-shrink: 0;
}

/* WooCommerce price overrides */
.efka-price-row__price .price,
.efka-price-row__price .woocommerce-Price-amount {
    color: var(--efka-red);
    font-size: 1rem;
    font-weight: 700;
}

.efka-sku {
    font-family: var(--efka-sku-font);
    font-size: .8rem;
    font-weight: 400;
    color: var(--efka-grey-mid);
}

/* ============================================================
   SET CONTENTS TABLE
   ============================================================ */
.efka-set-contents {
    margin-bottom: 1.5rem;
}

.efka-components-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.efka-components-table tr:nth-child(even) {
    background: var(--efka-grey-bg);
}

.efka-component__sku {
    font-family: var(--efka-sku-font);
    font-size: .82rem;
    font-weight: 700;
    padding: 5px 12px 5px 0;
    width: 130px;
    white-space: nowrap;
    vertical-align: top;
}

.efka-component__name {
    padding: 5px 0;
    vertical-align: top;
    line-height: 1.4;
}

.efka-component__sku a,
.efka-component__name a {
    color: var(--efka-text);
    text-decoration: none;
}
.efka-component__sku a:hover,
.efka-component__name a:hover {
    color: var(--efka-red);
    text-decoration: underline;
}

/* Dim included-only rows slightly */
.efka-component--included_only .efka-component__sku,
.efka-component--included_only .efka-component__name {
    color: #555;
}

/* Sellable / linked components — visually distinct */
.efka-component--linked .efka-component__sku,
.efka-component--linked .efka-component__name {
    font-weight: 700;
    color: var(--efka-text);
}
.efka-component--linked .efka-component__sku a,
.efka-component--linked .efka-component__name a {
    color: var(--efka-red);
    text-decoration: underline;
    text-decoration-color: rgba(192,57,43,.35);
    text-underline-offset: 2px;
}
.efka-component--linked .efka-component__sku a:hover,
.efka-component--linked .efka-component__name a:hover {
    color: var(--efka-red-dark);
    text-decoration-color: var(--efka-red-dark);
}

/* Flag needs_review rows (admin only, subtle) */
.efka-component--needs_review .efka-component__name {
    color: #a06000;
}

/* ============================================================
   ADMIN NOTES BANNER
   ============================================================ */
.efka-admin-notes {
    background: #fff8dc;
    border: 2px solid #e0a000;
    border-radius: 3px;
    padding: 10px 14px;
    margin-bottom: 1.5rem;
    font-size: .82rem;
    color: #5a3e00;
}

/* ============================================================
   ACCESSORY CARDS STRIP
   ============================================================ */
.efka-accessories-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--efka-border);
}

.efka-acc-card {
    background: #fff;
    border: 1px solid var(--efka-border);
    width: calc(20% - 12px); /* 5 per row at full width */
    min-width: 130px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    transition: box-shadow .15s;
}

.efka-acc-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,.14);
}

/* "Included" badge */
.efka-badge--included {
    display: block;
    background: var(--efka-grey-dark);
    color: #fff;
    font-size: .68rem;
    padding: 3px 6px;
    text-align: center;
    letter-spacing: .02em;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.efka-acc-card--included_badge .efka-acc-card__image {
    margin-top: 22px; /* space for badge */
}

.efka-acc-card__image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--efka-grey-bg);
}

.efka-acc-card__image img.efka-acc-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    display: block;
}

.efka-acc-img--placeholder {
    width: 100%;
    height: 100%;
    background: var(--efka-grey-light);
}

.efka-acc-card__body {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.efka-acc-card__name {
    font-weight: 700;
    font-size: .82rem;
    line-height: 1.3;
    color: var(--efka-text);
}

.efka-acc-card__sku {
    font-family: var(--efka-sku-font);
    font-size: .72rem;
    color: var(--efka-grey-mid);
}

.efka-acc-card__price {
    margin-top: 4px;
    font-size: .88rem;
    color: var(--efka-red);
    font-weight: 700;
}

.efka-acc-card__price .price,
.efka-acc-card__price .woocommerce-Price-amount,
.efka-acc-card__price .efka-acc-price-text {
    color: var(--efka-red);
    font-weight: 700;
}

/* Buttons — stack vertically with gap */
.efka-btn {
    display: block;
    padding: 5px 8px;
    text-align: center;
    font-size: .76rem;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
    margin-top: 5px;
}

.efka-acc-card__name-link {
    color: var(--efka-text);
    text-decoration: none;
}
.efka-acc-card__name-link:hover {
    color: var(--efka-red);
    text-decoration: underline;
}

.efka-btn--cart {
    background: var(--efka-red);
    color: #fff !important;
    border: 1px solid var(--efka-red-dark);
}

.efka-btn--cart:hover {
    background: var(--efka-red-dark);
    color: #fff !important;
}

.efka-btn--view {
    background: var(--efka-grey-light);
    color: var(--efka-text) !important;
    border: 1px solid var(--efka-border);
}

.efka-btn--view:hover {
    background: var(--efka-grey-dark);
    color: #fff !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media ( max-width: 900px ) {
    .efka-acc-card {
        width: calc(33.33% - 10px);
    }
}

@media ( max-width: 600px ) {
    .efka-header-title {
        font-size: 1.1rem;
    }

    .efka-acc-card {
        width: calc(50% - 8px);
    }

    .efka-component__sku {
        width: 100px;
    }
}

@media ( max-width: 400px ) {
    .efka-acc-card {
        width: 100%;
    }
}
