/* CMS Page Styles - Clean styling for CMS content only */

.cms-page-header {
    padding: 30px 0;
    background-color: #fff;
    text-align: center;
}

.cms-page-header .page-title {
    font-family: 'Rammetto One', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #00293D;
    margin: 0;
    text-transform: uppercase;
}

/* First .page-section after the title header: no extra section margin on top */
.cms-page-header ~ .page-section:first-of-type {
    margin-top: 0;
}

/* ─────────────────────────────────────────────────────────────────────────── */

.cms-page-section {
    padding: 50px 0;
    background-color: #f8f9fa;
}

/* Main page title - no top margin for first title */
.cms-page-section .page-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 40px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    color: #333;
    font-size: 2.5rem;
}

.cms-page-section .page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

/* Section titles - balanced spacing for content headers */
.cms-page-section .section-title {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    color: #333;
    font-size: 2.5rem;
}

.cms-page-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

/* CMS Page Container - White box around all content */
.cms-page {
    background: white;
    padding: var(--section-margin-top, 40px) 40px var(--section-margin-bottom, 40px);
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0;
}

.cms-page__content {
    line-height: 1.6;
    color: #555;
    font-size: 16px;
}

/* Generic blocks styling */
.cms-page__content h1,
.cms-page__content h2,
.cms-page__content h3,
.cms-page__content h4,
.cms-page__content h5,
.cms-page__content h6,
.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5,
.cms-content h6 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.cms-page__content p,
.cms-content p {
    margin-bottom: 20px;
}

.cms-page__content h1,
.cms-page__content h2,
.cms-page__content h3,
.cms-page__content h4,
.cms-page__content h5,
.cms-page__content h6 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.cms-page__content h1 { font-size: 2em; }
.cms-page__content h2 { font-size: 1.7em; }
.cms-page__content h3 { font-size: 1.4em; }
.cms-page__content h4 { font-size: 1.2em; }
.cms-page__content h5 { font-size: 1.1em; }
.cms-page__content h6 { font-size: 1em; }

.cms-page__content p {
    margin-bottom: 20px;
}

.cms-page__content ul,
.cms-page__content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.cms-page__content li {
    margin-bottom: 8px;
}

/* NO strong styling to avoid interference with product card prices */

.cms-page__content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 4px;
}

.cms-page__content img:not(.product-card__image) {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

/* CMS Image Size Classes - Match admin editor functionality */
.cms-image {
    margin: 20px 0;
    display: block;
}

.cms-image img {
    border-radius: 4px;
    height: auto;
}

/* Image sizes */
.cms-image--thumbnail img {
    max-width: 150px;
    width: 150px;
}

.cms-image--small img {
    max-width: 300px;
    width: 300px;
}

.cms-image--medium img {
    max-width: 600px;
    width: 600px;
}

.cms-image--large img {
    max-width: 900px;
    width: 900px;
}

.cms-image--full img {
    max-width: 100%;
    width: 100%;
}

/* Image alignment */
.cms-image--left {
    text-align: left;
}

.cms-image--center {
    text-align: center;
}

.cms-image--right {
    text-align: right;
}

.cms-image--none {
    text-align: left;
}

/* Figure styling for images with captions */
.cms-page__content figure.cms-image {
    margin: 20px 0;
    padding: 0;
}

.cms-page__content figure.cms-image img {
    display: block;
    margin: 0 auto;
}

.cms-page__content figure.cms-image figcaption {
    margin-top: 10px;
    font-style: italic;
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* Responsive adjustments for image sizes */
@media (max-width: 768px) {
    .cms-image--large img,
    .cms-image--medium img {
        max-width: 100%;
        width: 100%;
    }
    
    .cms-image--small img {
        max-width: 250px;
        width: 250px;
    }
    
    .cms-image--thumbnail img {
        max-width: 120px;
        width: 120px;
    }
}

@media (max-width: 480px) {
    .cms-image--small img {
        max-width: 200px;
        width: 200px;
    }
    
    .cms-image--thumbnail img {
        max-width: 100px;
        width: 100px;
    }
}

.cms-page__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cms-page__content table th,
.cms-page__content table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.cms-page__content table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.cms-page__content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* NO link styling to avoid any interference with product cards */

.cms-page__content code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.cms-page__content pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.cms-page__content pre code {
    background: none;
    padding: 0;
    color: #333;
}

.cms-page__footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cms-page__meta {
    color: #888;
    font-size: 14px;
    margin: 0;
    text-align: center;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .cms-page-section {
        padding: 20px 0;
    }
    
    .cms-page {
        width: 100%;
        margin: 0;
        padding: 20px;
    }
    
    .cms-page__content {
        font-size: 15px;
    }
    
    .cms-page__content ul,
    .cms-page__content ol {
        padding-left: 20px;
    }
}

@media (max-width: 480px) {
    .cms-page {
        width: 100%;
        margin: 0;
        padding: 15px;
    }
    
    .cms-page__content table {
        font-size: 14px;
    }
    
    .cms-page__content table th,
    .cms-page__content table td {
        padding: 8px;
    }
}

/* CMS Content Blocks - Individual white containers */
.cms-content {
    background: white;
    padding: var(--section-margin-top, 40px) 40px var(--section-margin-bottom, 40px);
    margin: 20px 0;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Product grid styling moved to product-grid-section.css */

/* Last edited bar */
.cms-last-edited {
    text-align: center;
    padding: 16px 0 24px;
    background: transparent;
}

.cms-last-edited__text {
    color: #888;
    font-size: 13px;
    font-style: italic;
    margin: 0;
}

/* Print styles */
@media print {
    .cms-page-section {
        background: white;
        padding: 0;
    }
    
    .cms-page {
        box-shadow: none;
        padding: 0;
    }
    
    .cms-page__meta {
        display: none;
    }
    
    /* Hide product cards in print to save space */
    .featured-products {
        display: none;
    }
}

/* ── Outcome section (thank-you / success / failure) ────────────────────────
   Ported from public/css/consumer/checkout.css so CMS pages using the
   outcome_section partial render identically to the old hard-coded
   checkout_bedankt / checkout_success / checkout_failure templates.
   CSS is duplicated intentionally: the CMS page loader loads cms_page.css
   but not checkout.css, and we don't want to force extra style files. */
.checkout-bedankt {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}
.checkout-bedankt__icon {
    font-size: 3.5rem;
    color: var(--ub-bright-blue, #00AAFF);
    margin-bottom: 16px;
    line-height: 1;
}
.checkout-bedankt__icon--success { color: #1d7f3e; }
.checkout-bedankt__icon--failure { color: #c0392b; }
.checkout-bedankt__icon--info    { color: var(--ub-bright-blue, #00AAFF); }
.checkout-bedankt__hint {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--ub-text-muted, #6B7A99);
}
.checkout-bedankt__title {
    margin: 0 0 12px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ub-navy, #00293D);
}
.checkout-bedankt__lead {
    margin: 0 0 40px;
    font-size: 1.05rem;
    color: var(--ub-text-muted, #6B7A99);
    line-height: 1.6;
}
.checkout-bedankt__next {
    background: var(--ub-surface-alt, #F0F4F8);
    border-radius: 12px;
    padding: 24px 32px;
    text-align: left;
    margin-bottom: 32px;
}
.checkout-bedankt__next h2 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: var(--ub-navy, #00293D);
}
.checkout-bedankt__next ol {
    margin: 0;
    padding-left: 20px;
    color: var(--ub-navy, #00293D);
    line-height: 1.7;
}
.checkout-bedankt__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.checkout-bedankt__btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.checkout-bedankt__btn--primary {
    background: var(--ub-bright-blue, #00AAFF);
    color: #fff;
}
.checkout-bedankt__btn--primary:hover {
    background: #0088CC;
    color: #fff;
}
.checkout-bedankt__btn--secondary {
    background: transparent;
    color: var(--ub-navy, #00293D);
    border: 1px solid var(--ub-grey-medium, #CBD1DC);
}
.checkout-bedankt__btn--secondary:hover {
    background: var(--ub-surface-alt, #F0F4F8);
    border-color: var(--ub-navy, #00293D);
}
