/* ============================================
   DUTCH DELIGHTS THEME - COMPLETE STYLING
   ============================================ */

/* 
   DUTCH DESIGN PRINCIPLES:
   - Delft Blue (traditional ceramic patterns)
   - Warm, cozy atmosphere
   - Natural materials (wood tones)
   - Clean lines and simplicity
   - Color palette: Blue (#003399, #4A90E2), Red (#AD1D25), Orange (#FF9500), Cream, Wood tones
   - Tulips and traditional patterns
*/

/* ============================================
   COLOR PALETTE - DUTCH DELIGHTS
   ============================================ */

:root {
    /* Primary Colors - Dutch Flag */
    --delft-blue: #003399;          /* Deep Delft Blue */
    --dutch-red: #AD1D25;           /* Dutch Red - Bravery & Strength */
    --dutch-white: #FFFFFF;         /* Peace & Honesty */

    /* Secondary Colors */
    --dutch-orange: #FF9500;        /* Royal Orange */
    --delft-light-blue: #4A90E2;    /* Light Delft Blue */
    --dutch-cream: #FFF8DC;         /* Warm cream - traditional Dutch interior */
    --dutch-beige: #D4A574;         /* Warm wood tone */
    --dutch-green: #2D5016;         /* Natural green */

    /* Accent Colors - For buttons and highlights */
    --accent-gold: #D4AF37;         /* Gold for premium feel */
    --accent-rust: #8B4513;         /* Rust brown - natural material */

    /* Utility Colors */
    --light-bg: #F5F1E8;            /* Soft cream background */
    --border-color: #E0D5C8;        /* Subtle borders */
    --text-dark: #2C2416;           /* Deep brown text */
    --text-light: #666666;          /* Medium gray */
}

/* ============================================
   BODY & OVERALL LAYOUT
   ============================================ */

html, body {
    font-family: 'Georgia', 'Garamond', serif; /* Traditional serif for Dutch aesthetic */
    background-color: var(--light-bg);
    color: var(--text-dark);
    font-size: 16px;
}

/* ============================================
   NAVBAR - DUTCH DELIGHTS BRANDING
   ============================================ */

.navbar {
    background: linear-gradient(135deg, var(--delft-blue) 0%, var(--delft-light-blue) 100%);
    border-bottom: 4px solid var(--dutch-red);
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.15);
}

.navbar-brand {
    color: var(--dutch-white) !important;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.navbar-brand i {
    color: var(--dutch-orange);
    margin-right: 0.75rem;
}

/* ============================================
   BUTTONS - DUTCH THEMED
   ============================================ */

.btn {
    border-radius: 8px;
    font-weight: 600;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Primary Button - Dutch Red */
.btn-primary {
    background-color: var(--dutch-red);
    color: var(--dutch-white);
}

.btn-primary:hover {
    background-color: #8B151C;
    color: var(--dutch-white);
}

.btn-primary:active {
    background-color: #6B0F17;
}

/* Secondary Button - Delft Blue */
.btn-outline-primary {
    color: var(--delft-blue);
    border: 2px solid var(--delft-blue);
    background-color: var(--dutch-white);
}

.btn-outline-primary:hover {
    background-color: var(--delft-blue);
    color: var(--dutch-white);
}

/* Success Button - Dutch Orange */
.btn-success {
    background-color: var(--dutch-orange);
    color: var(--dutch-white);
}

.btn-success:hover {
    background-color: #E68400;
    color: var(--dutch-white);
}

/* Danger Button - Dark Red */
.btn-danger {
    background-color: #C41E3A;
    color: var(--dutch-white);
}

.btn-danger:hover {
    background-color: #A31830;
}

/* ============================================
   BADGE - DUTCH DELIGHTS STYLE
   ============================================ */

.badge {
    background-color: var(--dutch-red);
    color: var(--dutch-white);
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    font-weight: 600;
}

.badge.bg-danger {
    background-color: var(--dutch-red) !important;
}

.badge.bg-warning {
    background-color: var(--dutch-orange) !important;
    color: var(--dutch-white);
}

/* ============================================
   CARDS - MENU ITEMS (DUTCH CERAMIC STYLE)
   ============================================ */

.menu-item-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--dutch-white);
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--delft-blue);
    margin-bottom: 1.5rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.menu-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 51, 153, 0.15);
    border-top-color: var(--dutch-red);
}

.menu-item-card img {
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--delft-light-blue), var(--dutch-cream));
}

.card-body {
    padding: 1.25rem;
    background: linear-gradient(to bottom, var(--dutch-white), var(--light-bg));
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.15rem;
    color: var(--delft-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Georgia', serif;
}

.card-text {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.price-tag {
    color: var(--dutch-red);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* ============================================
   CATEGORY NAVIGATION - DUTCH TILES STYLE
   ============================================ */

#category-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--delft-blue);
    -webkit-overflow-scrolling: touch;
}

#category-pills .nav-link {
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
    margin-right: 0.5rem;
    border-radius: 6px;
    color: var(--text-dark);
    background-color: var(--dutch-cream);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

#category-pills .nav-link:hover {
    background-color: var(--delft-light-blue);
    color: var(--dutch-white);
    border-left-color: var(--dutch-red);
    transform: translateY(-2px);
}

#category-pills .nav-link.active {
    background-color: var(--delft-blue);
    color: var(--dutch-white);
    border-left-color: var(--dutch-red);
    box-shadow: 0 4px 8px rgba(0, 51, 153, 0.2);
}

/* ============================================
   MODALS - DUTCH WINDOW STYLE
   ============================================ */

.modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
}

.modal-content {
    border: none;
    border-radius: 12px;
    border-top: 8px solid var(--delft-blue);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background-color: var(--dutch-cream);
    max-height: 90vh;
}

.modal-header {
    background: linear-gradient(135deg, var(--delft-blue), var(--delft-light-blue));
    color: var(--dutch-white);
    border: none;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.modal-header .modal-title {
    color: var(--dutch-white);
    font-size: 1.35rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: var(--text-dark);
}

.modal-footer {
    border-top: 2px solid var(--border-color);
    padding: 1.25rem;
    background-color: var(--light-bg);
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    margin: 0.25rem;
}

/* ============================================
   FORM CONTROLS - DUTCH DELIGHTS STYLE
   ============================================ */

.form-control, 
.form-select, 
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    font-size: 16px !important;
    padding: 0.75rem;
    min-height: 44px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus, 
.form-select:focus {
    border-color: var(--delft-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Labels */
label {
    color: var(--delft-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* ============================================
   CART SIDEBAR - DUTCH DELIGHTS STYLE
   ============================================ */

.cart-sidebar {
    position: fixed;
    right: -100%;
    top: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, var(--dutch-white), var(--light-bg));
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease-in-out;
    z-index: 1050;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-left: 6px solid var(--delft-blue);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    background: linear-gradient(135deg, var(--delft-blue), var(--delft-light-blue));
    color: var(--dutch-white);
    padding: 1.5rem;
    border-bottom: 4px solid var(--dutch-red);
    font-weight: 700;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

/* ============================================
   ALERTS & MESSAGES - DUTCH DELIGHTS
   ============================================ */

.alert {
    border: none;
    border-left: 4px solid var(--delft-blue);
    border-radius: 6px;
}

.alert-success {
    background-color: #E8F5E9;
    border-left-color: var(--dutch-green);
    color: var(--dutch-green);
}

.alert-danger {
    background-color: #FFEBEE;
    border-left-color: var(--dutch-red);
    color: var(--dutch-red);
}

.alert-warning {
    background-color: #FFF3E0;
    border-left-color: var(--dutch-orange);
    color: #E65100;
}

.alert-info {
    background-color: #E1F5FE;
    border-left-color: var(--delft-blue);
    color: var(--delft-blue);
}

/* ============================================
   TYPOGRAPHY - DUTCH HERITAGE
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--delft-blue);
    font-family: 'Georgia', serif;
    font-weight: 700;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

p {
    line-height: 1.6;
    color: var(--text-dark);
}

a {
    color: var(--delft-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dutch-red);
}

/* ============================================
   BADGES & LABELS - DUTCH DELIGHTS
   ============================================ */

.combo-badge, .mealdeal-badge {
    background: linear-gradient(135deg, var(--dutch-orange), #FF6B35);
    color: var(--dutch-white);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.available-badge {
    background-color: var(--dutch-green);
    color: var(--dutch-white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.unavailable-badge {
    background-color: #999999;
    color: var(--dutch-white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* ============================================
   RESPONSIVE DESIGN - DUTCH DELIGHTS
   ============================================ */

@media (min-width: 576px) {
    .cart-sidebar {
        width: 420px;
        right: -420px;
    }

    .modal-dialog {
        margin: 1.75rem auto;
        max-width: 90%;
    }

    .navbar-brand {
        font-size: 1.75rem;
    }
}

@media (min-width: 768px) {
    .navbar-brand {
        max-width: none;
    }

    #category-pills {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .modal-dialog {
        max-width: 600px;
    }

    .modal-lg {
        max-width: 800px;
    }

    .cart-sidebar {
        width: 450px;
        right: -450px;
    }

    .menu-item-card {
        min-height: 350px;
    }
}

@media (min-width: 992px) {
    .modal-dialog {
        max-width: 700px;
    }

    .modal-lg {
        max-width: 900px;
    }

    h1 {
        font-size: 2.5rem;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ============================================
   iOS SAFARI SPECIFIC FIXES
   ============================================ */

@supports (-webkit-touch-callout: none) {

    /* Enable smooth scrolling for the main page */
    html, body {
        -webkit-overflow-scrolling: touch;
    }

    /* Cart sidebar height fix */
    .cart-sidebar {
        height: -webkit-fill-available;
        -webkit-overflow-scrolling: touch;
    }

    /* ONLY lock body when modal is actually open */
    body.modal-open {
        position: fixed;
        overflow: hidden;
        width: 100%;
        top: 0;
        left: 0;
    }

    /* Ensure modals scroll internally */
    .modal-body {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Fix for category pills horizontal scroll */
    #category-pills {
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   ACCESSIBILITY & FOCUS STATES
   ============================================ */

.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--delft-blue);
    outline-offset: 2px;
}

/* ============================================
   DISABLED & LOADING STATES
   ============================================ */

.btn.disabled,
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background-color: #CCCCCC;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .cart-sidebar,
    .cart-overlay,
    .navbar,
    .btn {
        display: none !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-dutch-blue {
    color: var(--delft-blue);
}

.text-dutch-red {
    color: var(--dutch-red);
}

.text-dutch-orange {
    color: var(--dutch-orange);
}

.bg-dutch-cream {
    background-color: var(--dutch-cream);
}

.bg-delft-blue {
    background-color: var(--delft-blue);
}

.touch-target {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   DECORATIVE ELEMENTS - DUTCH PATTERNS
   ============================================ */

/* Delft Blue inspired border patterns */
.delft-pattern-top {
    border-top: 3px dashed var(--delft-blue);
    padding-top: 1rem;
}

.delft-pattern-bottom {
    border-bottom: 3px dashed var(--delft-blue);
    padding-bottom: 1rem;
}

/* Dutch heritage accent */
.heritage-accent {
    position: relative;
    padding-left: 1rem;
}

.heritage-accent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--delft-blue), var(--dutch-red), var(--dutch-orange));
}

/* ============================================
   HIGH DPI SCREENS
   ============================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .menu-item-card {
        box-shadow: 0 2px 6px rgba(0, 51, 153, 0.08);
    }

    .btn {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }
}
