/* ==========================================================================
   SORTI BESPOKE PRECISION TAILORING — BROCHURE STYLESHEET (WEBSITE PALETTE MATCH)
   ========================================================================== */

/* --- ROOT VARIABLES MATCHING WEBSITE DESIGN SYSTEM --- */
:root {
    /* Logo & Website Core Color System */
    --color-primary: #33462B;         /* Forest Olive Green */
    --color-primary-dark: #1C2A18;    /* Deep Evergreen Midnight */
    --color-primary-light: #4A6043;   /* Atelier Sage */
    --color-primary-soft: #EEF3EC;    /* Soft Olive Linen Tint */
    
    --color-accent: #C5A059;          /* Bespoke Gold */
    --color-accent-light: #D9B876;    
    --color-accent-dark: #9E7E3D;

    --color-bg-light: #FAF8F5;        /* Warm Silk Linen Background */
    --color-bg-cream: #F3EFE7;        /* Soft Atelier Cream */
    --color-bg-card: #FFFFFF;         /* Crisp Card Background */
    
    --color-dark: #172116;            /* Luxury Dark Evergreen */
    --color-dark-surface: #202D1E;    /* Dark Surface */

    --color-text-main: #1F271E;       /* Deep Slate Olive Charcoal */
    --color-text-muted: #5B675A;      /* Body Text */
    --color-text-light: #8D988C;      /* Secondary Light Text */
    --color-white: #FFFFFF;

    /* Theme Aliases for Brochure */
    --bg-dark: #172116;
    --bg-card: #202D1E;
    --bg-elevated: #283726;
    --gold-primary: #C5A059;
    --gold-light: #D9B876;
    --gold-dark: #9E7E3D;
    --gold-gradient: linear-gradient(135deg, #C5A059 0%, #D9B876 50%, #9E7E3D 100%);
    --text-primary: #FAF8F5;
    --text-secondary: #C8D1C7;
    --text-muted-dark: #8D988C;
    --border-gold: rgba(197, 160, 89, 0.4);
    --border-subtle: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-heading: 'Cinzel', 'Cormorant Garamond', serif;
    --font-serif: 'Cormorant Garamond', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* A4 Dimensions for Web Preview */
    --a4-width: 210mm;
    --a4-height: 296mm;
}

/* --- BASE RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: #0E140D;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- TOP ACTION BAR --- */
.action-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(23, 33, 22, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-gold);
    padding: 12px 24px;
}

.action-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.action-btn--back {
    background: transparent;
    color: var(--color-bg-cream);
    border-color: var(--border-gold);
}

.action-btn--back:hover {
    color: var(--gold-light);
    background: rgba(197, 160, 89, 0.15);
}

.action-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--gold-primary);
}

.action-logo {
    height: 24px;
    width: auto;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn--share {
    background: #25D366;
    color: #000;
    border: none;
}

.action-btn--share:hover {
    background: #20BA5A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.action-btn--download {
    background: var(--gold-gradient);
    color: var(--color-dark);
    border: none;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.action-btn--download:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.5);
}

/* --- BROCHURE CONTAINER (WEB DISPLAY) --- */
.brochure-wrapper {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.brochure-document {
    width: var(--a4-width);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* --- A4 PAGE STRUCTURE --- */
.brochure-page {
    width: var(--a4-width);
    height: var(--a4-height);
    background-color: var(--color-dark);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(14, 20, 13, 0.8), 0 0 0 1px var(--border-gold);
    page-break-after: always;
    break-after: page;
    display: flex;
    flex-direction: column;
    padding: 16mm 14mm;
}

.page-border {
    position: absolute;
    top: 6mm;
    left: 6mm;
    right: 6mm;
    bottom: 6mm;
    border: 1px solid var(--border-gold);
    pointer-events: none;
    z-index: 5;
}

.page-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
}

/* --- COMMON HEADERS & ELEMENTS --- */
.page-header {
    margin-bottom: 20px;
}

.page-header.center {
    text-align: center;
}

.header-label {
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-primary);
    display: block;
    margin-bottom: 4px;
}

.header-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-title em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--gold-light);
    font-weight: 400;
}

.header-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.gold-divider {
    width: 50px;
    height: 2px;
    background: var(--gold-gradient);
    margin: 10px 0 16px 0;
}

.gold-divider.center {
    margin-left: auto;
    margin-right: auto;
}

.page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-heading);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-muted-dark);
}

/* --- PAGE 1: COVER --- */
.page-cover {
    background: radial-gradient(circle at 50% 30%, #22311F 0%, #172116 75%);
    justify-content: space-between;
}

.cover-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    align-items: center;
    z-index: 10;
}

.cover-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.cover-logo {
    height: 54px;
    width: auto;
}

.cover-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cover-badge .badge-line {
    width: 30px;
    height: 1px;
    background: var(--gold-primary);
    opacity: 0.6;
}

.cover-badge .badge-text {
    font-family: var(--font-heading);
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--gold-primary);
}

.cover-hero-img-wrap {
    position: relative;
    width: 100%;
    height: 48%;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-gold);
}

.cover-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.cover-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(23,33,22,0) 60%, rgba(23,33,22,0.92) 100%);
}

.cover-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
}

.cover-title {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.cover-title em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--gold-light);
    font-weight: 400;
}

.cover-subtitle {
    font-family: 'Alex Brush', cursive;
    font-size: 26px;
    color: var(--gold-primary);
    margin-top: 4px;
}

.cover-desc {
    max-width: 440px;
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cover-footer {
    font-family: var(--font-heading);
    font-size: 8.5px;
    letter-spacing: 2px;
    color: var(--text-muted-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cover-footer .bullet {
    color: var(--gold-primary);
    font-size: 6px;
}

/* --- PAGE 2: HERITAGE --- */
.heritage-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    align-items: start;
    flex: 1;
}

.heritage-text-col .lead-text {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--gold-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.heritage-text-col p {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.stat-card {
    background: var(--color-dark-surface);
    border: 1px solid var(--border-gold);
    padding: 12px 8px;
    text-align: center;
    border-radius: 4px;
}

.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--gold-primary);
    font-weight: 600;
}

.stat-lbl {
    font-size: 9px;
    color: var(--text-muted-dark);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.heritage-img-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brochure-img-frame {
    position: relative;
    border: 1px solid var(--border-gold);
    border-radius: 4px;
    overflow: hidden;
}

.brochure-img-frame img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.brochure-img-frame.secondary img {
    height: 140px;
}

.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(23, 33, 22, 0.88);
    padding: 4px 8px;
    font-size: 9px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    color: var(--gold-light);
    text-align: center;
}

/* --- PAGE 3: SERVICES & FABRICS --- */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-dark-surface);
    border: 1px solid var(--border-subtle);
    padding: 12px 14px;
    border-radius: 4px;
    position: relative;
}

.service-num {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--gold-primary);
    font-weight: 600;
    min-width: 28px;
}

.service-content h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.service-content p {
    font-size: 10.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.service-badge {
    margin-left: auto;
    font-family: var(--font-heading);
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1px solid var(--border-gold);
    color: var(--gold-primary);
    border-radius: 2px;
    white-space: nowrap;
}

.brochure-fabric-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-gold);
    padding: 14px;
    border-radius: 4px;
    margin-top: 14px;
}

.fabric-banner-img {
    width: 110px;
    height: 90px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.fabric-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fabric-banner-info .fabric-title {
    font-family: var(--font-heading);
    font-size: 12px;
    color: var(--gold-light);
    margin-bottom: 6px;
}

.fabric-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fabric-list li {
    font-size: 10px;
    color: var(--text-secondary);
}

/* --- PAGE 4: PROCESS --- */
.steps-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-dark-surface);
    border: 1px solid var(--border-subtle);
    padding: 10px 14px;
    border-radius: 4px;
}

.step-card--highlight {
    background: linear-gradient(90deg, rgba(197,160,89,0.15) 0%, rgba(32,45,30,1) 100%);
    border-color: var(--border-gold);
}

.step-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-gold);
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-details h4 {
    font-family: var(--font-heading);
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.step-details p {
    font-size: 10.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.quote-box {
    background: rgba(197, 160, 89, 0.08);
    border-left: 2px solid var(--gold-primary);
    padding: 14px;
    margin-top: 10px;
}

.brochure-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 13.5px;
    color: var(--gold-light);
    line-height: 1.4;
}

.quote-author {
    display: block;
    margin-top: 6px;
    font-family: var(--font-heading);
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-muted-dark);
}

/* --- PAGE 5: CONTACT & APPOINTMENT --- */
.contact-header-logo {
    height: 46px;
    width: auto;
    margin-bottom: 8px;
}

.contact-card-box {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 16px;
    background: var(--color-dark-surface);
    border: 1px solid var(--border-gold);
    padding: 16px;
    border-radius: 4px;
    align-items: center;
}

.contact-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.contact-text {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 9px;
    color: var(--text-muted-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-val {
    font-size: 11px;
    color: var(--gold-light);
    font-weight: 500;
}

.portrait-wrap {
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    height: 180px;
}

.portrait-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-cta-bar {
    background: var(--gold-gradient);
    color: var(--color-dark);
    padding: 16px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.cta-left h4 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
}

.cta-left p {
    font-size: 10.5px;
    opacity: 0.9;
}

.cta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cta-phone {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
}

.cta-url {
    font-size: 9px;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* ==========================================================================
   RESPONSIVE DESIGN (SCREEN VIEW)
   ========================================================================== */
@media screen and (max-width: 850px) {
    .action-bar-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .brochure-wrapper {
        padding: 10px;
        overflow-x: auto;
    }

    .brochure-document {
        width: 100%;
        max-width: var(--a4-width);
    }

    .brochure-page {
        width: 100%;
        height: auto;
        min-height: var(--a4-height);
        padding: 25px 18px;
    }

    .heritage-grid,
    .contact-card-box {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PRINT & PDF EXPORT STYLES (MATCHED EXACTLY WITH WEBSITE PALETTE)
   ========================================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html, body {
        background-color: #172116 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .action-bar {
        display: none !important;
    }

    .brochure-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
    }

    .brochure-document {
        width: 210mm !important;
        gap: 0 !important;
    }

    .brochure-page {
        width: 210mm !important;
        height: 297mm !important;
        box-shadow: none !important;
        margin: 0 !important;
        page-break-before: always !important;
        page-break-after: always !important;
        break-after: page !important;
        overflow: hidden !important;
    }

    .page-cover {
        page-break-before: avoid !important;
    }
}
