/*--------------------------------------------------------------
Safeway Catalog Pro - Clean CSS v6.9
Single architecture: A4 page + 6 product cards
No legacy overrides, no duplicated layout blocks.
--------------------------------------------------------------*/

/* Estedad Font */
@font-face {
    font-family: 'Estedad';
    src: url('../fonts/Estedad-Regular.woff2') format('woff2'),
         url('../fonts/Estedad-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('../fonts/Estedad-Medium.woff2') format('woff2'),
         url('../fonts/Estedad-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('../fonts/Estedad-Bold.woff2') format('woff2'),
         url('../fonts/Estedad-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Variables */
:root {
    --scp-navy: #071d36;
    --scp-navy-2: #0b2747;
    --scp-gold: #d8b45f;
    --scp-gold-2: #b9923f;
    --scp-text: #111827;
    --scp-feature: #243447;
    --scp-muted: #64748b;
    --scp-border: #c8ced8;
    --scp-soft: #f3f4f6;
}

/* Base */
.scp-catalog,
.scp-catalog * {
    box-sizing: border-box;
    font-family: 'Estedad', sans-serif;
}

.scp-toolbar {
    width: min(210mm, calc(100vw - 24px));
    margin: 18px auto;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    direction: rtl;
}

.scp-print-btn {
    border: 0;
    background: var(--scp-navy);
    color: #fff;
    border-radius: 10px;
    padding: 11px 22px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.scp-toolbar span {
    color: var(--scp-muted);
    font-size: 13px;
}

.scp-catalog {
    direction: rtl;
    color: var(--scp-text);
    background: #f4f6f9;
    padding: 16px 0;
}

/* A4 page.
   Mobile: scaled to screen width.
   Desktop/Print: exact A4-like size. */
.scp-page {
    width: min(210mm, calc(100vw - 20px));
    aspect-ratio: 210 / 296;
    margin: 0 auto 16px;
    background: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .12);
}

/* Cover & Last Page */
.scp-cover,
.scp-last-page {
    background: linear-gradient(135deg, #06182f 0%, #0b2747 54%, #06182f 100%);
    color: #fff;
    display: grid;
    place-items: center;
    text-align: center;
}

.scp-cover-frame,
.scp-last-frame {
    width: 79%;
    height: 78%;
    border: 1px solid rgba(216, 180, 95, .58);
    border-radius: 4.7%;
    padding: 12% 8% 7%;
}

.scp-cover-logo,
.scp-last-logo {
    width: 28%;
    max-height: 13%;
    object-fit: contain;
    margin-bottom: 9%;
}

.scp-cover-kicker {
    color: var(--scp-gold);
    letter-spacing: .10em;
    font-size: clamp(8px, 1.85vw, 15px);
    font-weight: 700;
    margin-bottom: 4%;
}

.scp-cover h1 {
    font-size: clamp(18px, 4.3vw, 35px);
    line-height: 1.4;
    margin: 0 0 5%;
    font-weight: 700;
}

.scp-cover p,
.scp-last-page p {
    font-size: clamp(8px, 1.85vw, 15px);
    line-height: 2.15;
    margin: 0;
    color: rgba(255, 255, 255, .92);
}

.scp-cover-footer,
.scp-last-contact {
    margin-top: 13%;
    display: flex;
    justify-content: center;
    gap: 9%;
    color: var(--scp-gold);
    font-weight: 500;
    font-size: clamp(7px, 1.45vw, 12px);
}

.scp-last-page h2 {
    font-size: clamp(15px, 3.45vw, 28px);
    margin: 0 0 6%;
    color: #fff;
    font-weight: 700;
}

/* Product page fixed grid */
.scp-products-page {
    display: grid;
    grid-template-columns: 5.2% 1fr 5.2%;
    grid-template-rows:
        3.6%
        5.8%
        1.8%
        5.1%
        1.4%
        4.7%
        1.9%
        1fr
        2.1%
        3.2%;
}

.scp-page-header {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1.4px solid var(--scp-gold);
    min-height: 0;
}

.scp-page-header img {
    width: 16%;
    max-height: 82%;
    object-fit: contain;
}

.scp-page-title strong {
    display: block;
    color: var(--scp-navy);
    font-size: clamp(7px, 1.55vw, 13px);
    font-weight: 700;
}

.scp-page-title span {
    display: block;
    color: var(--scp-muted);
    font-size: clamp(5.5px, 1.2vw, 10px);
    font-weight: 400;
}

.scp-section-title {
    grid-column: 2;
    grid-row: 4;
    border-right: 4px solid var(--scp-gold);
    padding: .4% 2.4% .3% 0;
    min-height: 0;
    overflow: hidden;
}

.scp-section-title h2 {
    margin: 0;
    color: var(--scp-navy);
    font-size: clamp(10px, 2.15vw, 18px);
    line-height: 1.25;
    font-weight: 700;
}

.scp-section-title p {
    margin: .2% 0 0;
    color: var(--scp-gold-2);
    font-size: clamp(6px, 1.3vw, 11px);
    font-weight: 500;
}

.scp-section-title-small h2 {
    font-size: clamp(9px, 1.8vw, 15px);
}

.scp-section-title-small p {
    font-size: clamp(5px, 1.1vw, 9.5px);
}

.scp-type-heading {
    grid-column: 2;
    grid-row: 6;
    padding: .85% 2%;
    background: #f8fafc;
    border-right: 4px solid var(--scp-gold);
    border-bottom: 1px solid #e5e7eb;
    color: var(--scp-navy);
    font-size: clamp(8px, 1.65vw, 14px);
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
}

.scp-type-heading small {
    display: inline-block;
    margin-right: 2%;
    color: var(--scp-gold-2);
    font-size: clamp(5px, 1.2vw, 10px);
    font-weight: 500;
}

/* Card grid: 6 cards, 2 columns × 3 rows */
.scp-card-grid {
    grid-column: 2;
    grid-row: 8;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 2.2% 2.6%;
    min-height: 0;
}

/* Product card: one clean layout.
   Image / Info / MOQ are isolated, so text cannot overlap MOQ. */
.scp-product-card {
    border: 1.15px solid var(--scp-border);
    border-radius: 3.2%;
    background: #fff;
    overflow: hidden;
    min-height: 0;
    display: grid;
    grid-template-rows: 42% 46% 12%;
    page-break-inside: avoid;
    break-inside: avoid;
}

.scp-product-image {
    grid-row: 1;
    background: var(--scp-soft);
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    place-items: center;
    overflow: hidden;
    min-height: 0;
    padding: 1mm;
}

.scp-product-image{
    display:flex;
    align-items:center;
    justify-content:center;
}

.scp-product-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
}

.scp-no-image {
    color: #9ca3af;
    font-size: clamp(6px, 1.2vw, 10px);
}

.scp-product-content {
    grid-row: 2;
    text-align: center;
    overflow: hidden;
    min-height: 0;
    padding: 1.3% 5.6% .6%;
    font-family: 'Estedad';
}

.scp-type-badge {
    display: inline-block;
    border: 1px solid rgba(216, 180, 95, .55);
    background: #fffaf0;
    color: var(--scp-gold-2);
    border-radius: 999px;
    padding: .25% 4.5%;
    font-size: clamp(4.2px, 1vw, 8px);
    line-height: 1.25;
    font-weight: 500;
    margin-bottom: 1%;
}

.scp-product-content h3 {
    margin: 0;
    color: var(--scp-navy);
    font-size: clamp(5.8px, 1.34vw, 10.5px);
    line-height: 1.18;
    font-weight: 700;
    font-family: 'Estedad';
    margin-bottom: 1.0%;
}

.scp-volume {
    color: #334155;
    font-size: clamp(5px, 1.05vw, 8.5px);
    line-height: 1.12;
    margin-top: .25%;
    margin-bottom: .45%;
    font-family: 'Estedad';
}

.scp-features {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
    max-height: 58%;
    overflow: hidden;
}

.scp-features li {
    position: relative;
    padding-right: 7%;
    margin: 0 0 .22%;
    color: var(--scp-feature);
    font-size: clamp(5.8px, 1.18vw, 10px);
    line-height: 1.2;
}

.scp-features li:before {
    content: "–";
    position: absolute;
    right: 0;
    top: 0;
    color: var(--scp-navy);
    font-weight: 700;
}

.scp-moq {
    grid-row: 3;
    align-self: center;
    justify-self: center;
    width: 88%;
    height: 58%;
    min-height: 11px;
    border: 1px solid var(--scp-gold);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5%;
    color: var(--scp-navy);
    background: #fff;
    font-size: clamp(6.5px, 1.4vw, 11px);
    line-height: 1;
    font-weight: 600;
    z-index: 2;
}

.scp-moq strong {
    font-weight: 600;
}

/* Footer */
.scp-page-footer {
    grid-column: 2;
    grid-row: 10;
    display: flex;
    justify-content: space-between;
    color: #94a3b8;
    border-top: 1px solid #edf0f5;
    padding-top: .7%;
    font-size: clamp(5px, 1vw, 9px);
}

/* TOC */
.scp-toc-page {
    padding: 4.4% 5.2% 5.6%;
}

.scp-toc h2 {
    color: var(--scp-navy);
    font-size: clamp(12px, 2.6vw, 22px);
    margin: 10% 0 6%;
    font-weight: 700;
}

.scp-toc-cat {
    color: var(--scp-navy);
    font-size: clamp(9px, 1.9vw, 16px);
    font-weight: 700;
    margin: 4% 0 1.5%;
    border-right: 4px solid var(--scp-gold);
    padding-right: 2%;
}

.scp-toc-type {
    color: #334155;
    font-size: clamp(7px, 1.45vw, 12px);
    margin: 1% 5% 1% 0;
}

.scp-empty {
    padding: 14%;
    color: var(--scp-muted);
    text-align: center;
}

/* Desktop exact sizing */
@media (min-width: 900px) {
    .scp-page {
        width: 210mm;
        height: 296mm;
        aspect-ratio: auto;
    }

    .scp-page-title strong {
        font-size: 13px;
    }

    .scp-page-title span {
        font-size: 10px;
    }

    .scp-section-title h2 {
        font-size: 18px;
    }

    .scp-section-title p {
        font-size: 11px;
    }

    .scp-type-heading {
        font-size: 16px;
    }

    .scp-type-badge {
        font-size: 10px;
    }

    .scp-product-content h3 {
        font-size: 12.5px;
    }

    .scp-volume {
        font-size: 10px;
    }

    .scp-features {
        max-height: 55%;
    }

    .scp-features li {
        font-size: 11.5px;
        line-height: 1.22;
        margin-bottom: .35mm;
    }

    .scp-moq {
        font-size: 11px;
        min-height: 0;
    }
}

/* Mobile: same A4, scaled to width. 
   Only text is slightly protected for very small screens. */
@media (max-width: 899px) {
    .scp-features li {
        font-size: clamp(4.8px, 1.05vw, 8px);
        line-height: 1.12;
    }

    .scp-product-content h3 {
        font-size: clamp(5.3px, 1.25vw, 9.5px);
    }

    .scp-type-badge {
        font-size: clamp(4px, .95vw, 7.2px);
    }
}

/* Print */
@page {
    size: A4;
    margin: 0;
}

@media print {
    html,
    body {
        width: 210mm;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .no-print,
    .scp-toolbar,
    .elementor-location-header,
    .elementor-location-footer,
    #wpadminbar {
        display: none !important;
    }

    .scp-catalog {
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
    }

    .scp-page {
        width: 210mm !important;
        height: 296mm !important;
        min-height: 296mm !important;
        aspect-ratio: auto !important;
        margin: 0 !important;
        box-shadow: none !important;
        break-after: page;
        page-break-after: always;
    }

    .scp-page:last-child {
        break-after: auto !important;
        page-break-after: auto !important;
    }

    .scp-product-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

@media screen {
    .scp-page {
        box-shadow: 0 12px 40px rgba(15, 23, 42, .12);
    }
}
@media (max-width: 899px){

  .scp-catalog .scp-products-page .scp-product-image{
      display:flex !important;
      align-items:center !important;
      justify-content:center !important;
      overflow:hidden !important;
      min-height:0 !important;
      background:#f3f4f6 !important;
  }

  .scp-catalog .scp-products-page .scp-product-image img{
      display:block !important;
      width:100% !important;
      height:100% !important;
      max-width:100% !important;
      max-height:100% !important;
      object-fit:contain !important;
      object-position:center center !important;
      opacity:1 !important;
      visibility:visible !important;
  }
}