/* ============================================
   CATALOG PDF TEMPLATE STYLES - NEW PREMIUM DESIGN
   Monochromatic (Black, White, Metallic Gray)
   Rendered off-screen by html2pdf.js
   ============================================ */

.catalog-export {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: #121212;
    background: #ffffff;
    line-height: 1.4;
    width: 210mm; /* A4 Width */
    /* no fixed height here, let pages dictate */
}

.catalog-page {
    width: 210mm;
    min-height: 296mm; /* Almost A4 Height */
    position: relative;
    background-color: #ffffff; /* Clean white backdrop */
    overflow: hidden;
    page-break-after: always;
    display: flex;
    flex-direction: column;
}

.catalog-page:last-child {
    page-break-after: avoid;
}

/* ── HEADER ── */
.catalog-header {
    height: 60mm;
    position: relative;
    background-color: #ffffff;
}

/* Diagonal shape mimicking the reference */
.header-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #121212 0%, #212529 60%, #343a40 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 75%);
    z-index: 1;
}

/* Metallic Gray Accent Shape */
.header-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(to right, #e9ecef, #adb5bd);
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
    z-index: 2;
    border-right: 5px solid #121212;
}

.header-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    padding: 20mm;
    box-sizing: border-box;
}

.header-logo-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 10px;
    height: 80px;
}

.header-logo-box img {
    max-height: 80px;
    max-width: 220px;
    object-fit: contain;
}

.header-title {
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50%;
}

.header-title h1 {
    font-size: 42px;
    font-weight: 900;
    margin: 0;
    line-height: 0.9;
    text-transform: uppercase;
    color: #ffffff;
}

.header-title span {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

/* ── GRID ── */
.catalog-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10mm;
    padding: 10mm 15mm;
    background-color: #f8f9fa; /* Very subtle clean gray */
    align-content: start; /* Prevent items from stretching and causing huge vertical gaps */
}

.catalog-export .product-card {
    background-color: #ffffff;
    border-radius: 4px;
    padding: 0;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 68mm; /* Fixed height for consistency */
}

/* Black tag at top left */
.catalog-export .product-tag {
    background-color: #121212;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    display: inline-block;
    align-self: flex-start;
    border-bottom-right-radius: 8px;
    text-transform: uppercase;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

.catalog-export .product-img {
    height: 30mm;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.catalog-export .product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.catalog-export .product-info {
    padding: 10px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.catalog-export .product-brand {
    font-size: 10px;
    font-weight: 900;
    color: #121212;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.catalog-export .product-desc {
    font-size: 10px;
    font-weight: 600;
    color: #121212;
    line-height: 1.3;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.catalog-export .product-price {
    margin-top: 5px;
    border-top: 1px solid #dee2e6;
    padding-top: 5px;
}

.catalog-export .product-price .main-price {
    font-size: 24px;
    font-weight: 900;
    color: #000000;
}

.catalog-export .product-price .sub-price {
    font-size: 13px;
    color: #000000;
    font-weight: 800;
}

/* Diagonal accent on bottom right of the card */
.catalog-export .card-accent {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, transparent 50%, #121212 50%);
}

/* ── FOOTER ── */
.catalog-footer {
    height: 25mm;
    background-color: #121212;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15mm;
    position: relative;
    overflow: hidden;
}

/* Metallic Gray shape in footer */
.footer-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(to right, #ced4da, #6c757d);
    clip-path: polygon(0 0, 75% 0, 100% 100%, 0 100%);
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
}

.footer-left {
    color: #121212; /* Contrasts against the metallic accent */
    font-weight: 900;
    font-size: 14px;
    background-color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
}

.footer-center {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dee2e6;
}

.footer-right {
    text-align: right;
    color: #adb5bd;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}