/**
 * ============================================
 * RESTAURANT/CAFÉ PREMIUM THEME - BASE STYLES
 * Foundation styles for typography and elements
 * Version: 1.0.0
 * ============================================
 */

/* ========================================
 * FONT IMPORTS
 * ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Inter:wght@300;400;500;600;700;800&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ========================================
 * HTML & BODY
 * ======================================== */
html {
    font-size: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--neutral-800);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Body scroll lock for modals */
body.modal-open,
body.menu-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0);
}

/* ========================================
 * TYPOGRAPHY - HEADINGS
 * ======================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--neutral-900);
    margin-bottom: var(--space-4);
}

h1, .h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tight);
}

h2, .h2 {
    font-size: var(--text-4xl);
    letter-spacing: var(--tracking-tight);
}

h3, .h3 {
    font-size: var(--text-3xl);
}

h4, .h4 {
    font-size: var(--text-2xl);
}

h5, .h5 {
    font-size: var(--text-xl);
}

h6, .h6 {
    font-size: var(--text-lg);
}

/* Display Headings */
.display-1 {
    font-size: var(--text-6xl);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-none);
}

.display-2 {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-none);
}

/* Accent Font Headings */
.heading-accent {
    font-family: var(--font-accent);
    font-weight: var(--font-medium);
    font-style: italic;
}

/* ========================================
 * TYPOGRAPHY - BODY TEXT
 * ======================================== */
p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: var(--text-xl);
    font-weight: var(--font-light);
    line-height: var(--leading-relaxed);
    color: var(--neutral-600);
}

.small, small {
    font-size: var(--text-sm);
}

.tiny {
    font-size: var(--text-xs);
}

/* Text Variants */
.text-muted {
    color: var(--neutral-500);
}

.text-accent {
    font-family: var(--font-accent);
    font-style: italic;
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.text-capitalize {
    text-transform: capitalize;
}

/* ========================================
 * LINKS
 * ======================================== */
a {
    color: var(--primary-main);
    transition: var(--transition-colors);
}

a:hover {
    color: var(--primary-accent);
}

/* Link Variants */
.link-underline {
    text-decoration: underline;
    text-decoration-color: var(--primary-light);
    text-underline-offset: 3px;
    transition: var(--transition);
}

.link-underline:hover {
    text-decoration-color: var(--primary-main);
}

.link-hover-effect {
    position: relative;
    display: inline-block;
}

.link-hover-effect::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-main);
    transition: width var(--transition-normal) var(--ease-out);
}

.link-hover-effect:hover::after {
    width: 100%;
}

/* ========================================
 * LISTS
 * ======================================== */
.list-styled {
    padding-left: var(--space-6);
}

.list-styled li {
    margin-bottom: var(--space-2);
    position: relative;
}

ul.list-styled {
    list-style-type: none;
}

ul.list-styled li::before {
    content: '';
    position: absolute;
    left: calc(var(--space-6) * -1);
    top: 0.6em;
    width: 6px;
    height: 6px;
    background-color: var(--primary-main);
    border-radius: 50%;
}

ol.list-styled {
    list-style-type: decimal;
}

/* Check List */
.list-check li {
    padding-left: var(--space-7);
    position: relative;
}

.list-check li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success);
    font-weight: var(--font-bold);
}

/* Inline List */
.list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* ========================================
 * BLOCKQUOTES
 * ======================================== */
blockquote {
    position: relative;
    padding: var(--space-6) var(--space-8);
    margin: var(--space-8) 0;
    background-color: var(--neutral-50);
    border-left: 4px solid var(--primary-main);
    font-family: var(--font-accent);
    font-size: var(--text-xl);
    font-style: italic;
    color: var(--neutral-700);
}

blockquote p {
    margin-bottom: var(--space-4);
}

blockquote cite,
blockquote footer {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--neutral-500);
    margin-top: var(--space-4);
}

blockquote cite::before,
blockquote footer::before {
    content: '— ';
}

/* Fancy Quote */
.blockquote-fancy {
    border-left: none;
    padding: var(--space-12) var(--space-8);
    text-align: center;
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--white) 100%);
    border-radius: var(--radius-xl);
}

.blockquote-fancy::before {
    content: '"';
    display: block;
    font-family: var(--font-heading);
    font-size: 6rem;
    line-height: 1;
    color: var(--primary-main);
    opacity: 0.3;
    margin-bottom: calc(var(--space-8) * -1);
}

/* ========================================
 * HORIZONTAL RULES
 * ======================================== */
hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: var(--space-8) 0;
}

hr.hr-thick {
    height: 3px;
}

hr.hr-primary {
    background-color: var(--primary-main);
}

hr.hr-gradient {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-main), transparent);
}

/* Decorative Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-8) 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: var(--space-4);
}

.divider:not(:empty)::after {
    margin-left: var(--space-4);
}

.divider-icon {
    color: var(--primary-main);
    font-size: var(--text-xl);
}

/* ========================================
 * IMAGES
 * ======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-fluid {
    width: 100%;
    height: auto;
}

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

.img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.img-rounded {
    border-radius: var(--radius-lg);
}

.img-circle {
    border-radius: 50%;
}

.img-shadow {
    box-shadow: var(--shadow-lg);
}

/* Image with overlay */
.img-overlay {
    position: relative;
    overflow: hidden;
}

.img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--overlay-gradient);
    opacity: 0;
    transition: var(--transition-opacity);
}

.img-overlay:hover::after {
    opacity: 1;
}

/* ========================================
 * FIGURES
 * ======================================== */
figure {
    margin: var(--space-8) 0;
}

figcaption {
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--neutral-500);
    font-style: italic;
    text-align: center;
}

/* ========================================
 * CODE & PREFORMATTED
 * ======================================== */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    padding: var(--space-1) var(--space-2);
    background-color: var(--neutral-100);
    border-radius: var(--radius-sm);
    color: var(--primary-accent);
}

pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    padding: var(--space-6);
    background-color: var(--neutral-900);
    color: var(--neutral-100);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: var(--space-6) 0;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ========================================
 * TABLES
 * ======================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-6) 0;
}

.table th,
.table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: var(--font-semibold);
    color: var(--neutral-900);
    background-color: var(--neutral-50);
}

.table tbody tr:hover {
    background-color: var(--neutral-50);
}

/* Striped Table */
.table-striped tbody tr:nth-child(odd) {
    background-color: var(--neutral-50);
}

/* Bordered Table */
.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border-color);
}

/* ========================================
 * SELECTION
 * ======================================== */
::selection {
    background-color: var(--primary-main);
    color: var(--white);
}

::-moz-selection {
    background-color: var(--primary-main);
    color: var(--white);
}

/* ========================================
 * SCROLLBAR
 * ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-400);
    border-radius: var(--radius-full);
    border: 2px solid var(--neutral-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-500);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-400) var(--neutral-100);
}

/* ========================================
 * PLACEHOLDER
 * ======================================== */
::placeholder {
    color: var(--neutral-400);
    opacity: 1;
}

:-ms-input-placeholder {
    color: var(--neutral-400);
}

::-ms-input-placeholder {
    color: var(--neutral-400);
}

/* ========================================
 * FOCUS STATES
 * ======================================== */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--primary-main);
    outline-offset: 2px;
}

/* ========================================
 * PRINT STYLES
 * ======================================== */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    img {
        page-break-inside: avoid;
    }
    
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
    
    .no-print {
        display: none !important;
    }
}
