/* static/css/style.css */

:root {
    /* Color Palette pulled from your logo */
    --mustard-gold: #cba052;
    --mustard-gold-dark: #a57f39;
    --earth-brown: #5c3a21;
    --dark-brown: #2b1a10;
    --cream-bg: #f9f6f0;
    --sage-green: #708259;
    --text-dark: #333333;
}

/* Base Styles */
body {
    font-family: "Stack Sans Headline", sans-serif; /* Gives that classic, bakery feel */
    background-color: var(--cream-bg);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}


input[type="number"] {
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    min-width: 65px;
}
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button { 
    -webkit-appearance: inner-spin-button !important; 
    appearance: inner-spin-button !important;
    opacity: 1 !important;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
input[type="tel"], 
input[type="url"],
select, 
textarea,
.form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: #fff;
    color: var(--text-dark);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
input[type="number"]:focus, 
input[type="tel"]:focus, 
input[type="url"]:focus,
select:focus, 
textarea:focus,
.form-input:focus {
    outline: none;
    border-color: var(--mustard-gold);
    box-shadow: 0 0 0 3px rgba(203, 160, 82, 0.25);
}

h1, h2, h3 {
    color: var(--dark-brown);
}

/* Navigation Bar */
nav {
    background-color: var(--dark-brown);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 70px; /* Adjust based on preference */
    width: auto;
}

.brand-name {
    color: var(--mustard-gold);
    font-family: "Gelasio", serif;
    font-size: 1.5rem;
    font-weight: normal;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 0;
    padding: 0;
}
.nav-links span {
    position: relative;
    display: inline-block;
    top: 1px;
    padding: 1px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--cream-bg);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--mustard-gold);
}

/* Buttons */
button, .btn {
    background-color: var(--mustard-gold);
    color: var(--dark-brown);
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

button:hover, .btn:hover {
    background-color: var(--earth-brown);
    color: var(--cream-bg);
}

/* Product Grid (For the Menu) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px;
}

.product-card {
    background-color: white;
    border: 1px solid #e0dcd3;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.product-card img {
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Main Content Container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
/* Table Styling for Dashboards */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dashboard-table th, .dashboard-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0dcd3;
}

.dashboard-table th {
    background-color: var(--dark-brown);
    color: var(--cream-bg);
    font-weight: bold;
}

.dashboard-table tr:hover {
    background-color: #f5f2eb;
}

.cart-subtotal-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Responsive Cart Table (Mobile) */
@media (max-width: 768px) {
    .responsive-cart-table thead {
        display: none;
    }
    .responsive-cart-table, .responsive-cart-table tbody, .responsive-cart-table tr, .responsive-cart-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .responsive-cart-table tr {
        margin-bottom: 20px;
        border: 1px solid #e0dcd3;
        border-radius: 8px;
        background-color: #fff;
    }
    .responsive-cart-table td {
        text-align: right;
        padding: 15px;
        padding-left: 45%;
        position: relative;
        border-bottom: 1px solid #f5f2eb;
        min-height: 50px;
    }
    .responsive-cart-table td:last-child {
        border-bottom: none;
    }
    .responsive-cart-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 15px;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--dark-brown);
    }
    /* Center align block elements inside td if needed */
    .responsive-cart-table td > div, .responsive-cart-table td > form {
        display: inline-block;
        text-align: right;
    }
    
    .responsive-cart-table .cart-subtotal-container {
        display: flex;
        justify-content: flex-end;
        gap: 15px;
    }
}

.warning-text {
    color: #d9534f;
    font-weight: bold;
}
/* static/css/style.css additions */
.login-input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #cba052; /* Mustard Gold */
    border-radius: 4px;
    background-color: #f9f6f0;
}

.login-container {
    border: 2px solid #5c3a21; /* Earth Brown */
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
}

/* === HOME PAGE ADDITIONS — append to static/css/style.css === */

/* Hero Banner */
.home-hero {
    position: relative;
    overflow: hidden;
    color: var(--cream-bg);
    text-align: center;
    padding: 7rem 2rem;
    border-radius: 25px;
    background: var(--dark-brown);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 350px;
}

.hero-slideshow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero-slideshow::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    z-index: 2;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1);
    z-index: 1;
    /* Continuous slow sweep */
    animation: zoomInOut 30s infinite alternate linear;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

@keyframes zoomInOut {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.hero-content {
    position: relative;
    z-index: 3;
}

.home-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--cream-bg);
    margin-bottom: 0.75rem;
}

.home-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Two-column layout: specials left, events right */
.home-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

/* Sections */
.home-section {
    margin: 3rem 0;
}

.home-section h2 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.home-section-subtitle {
    color: #7a6a60;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
}

/* Specials Grid */
.home-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.home-card {
    background: white;
    border: 1px solid #e0dcd3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.home-card-img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: #fafafa;
}

.home-card-img-placeholder {
    width: 100%;
    height: 160px;
    background: #f5ede3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.home-card-body {
    padding: 1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-card-desc {
    font-size: 0.9rem;
    color: #7a6a60;
    flex: 1;
}

.home-card-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.home-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--earth-brown);
}

.home-badge {
    background: var(--mustard-gold);
    color: var(--dark-brown);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Events List */
.home-events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-event-card {
    background: white;
    border: 1px solid #e0dcd3;
    border-left: 5px solid var(--mustard-gold);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.home-event-card:hover {
    transform: translateX(4px);
}

.home-event-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    background: var(--dark-brown);
    color: var(--cream-bg);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
}

.home-event-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.home-event-day {
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
}

.home-event-info h3 {
    margin-bottom: 0.3rem;
}

.home-event-time {
    font-size: 0.85rem;
    color: var(--earth-brown);
    margin-bottom: 0.4rem;
}

.home-event-desc {
    font-size: 0.9rem;
    color: #7a6a60;
}

/* Update these blocks in static/css/style.css */
.home-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #b0a098;
    font-size: 0.95rem;
    
    /* Added flexbox to center content vertically/horizontally */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #fff;
    border: 2px dashed #e0dcd3;
    border-radius: 8px;
    height: 100%; /* Stretches to fill the empty section */
}

/* Fix the broken span rule */
.home-empty-state span {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block; 
}

/* Mobile: stack columns vertically */
@media (max-width: 768px) {
    .home-two-col {
        grid-template-columns: 1fr;
    }

    .home-event-card { flex-direction: column; gap: 0.75rem; }
    .home-event-date-block { flex-direction: row; gap: 0.5rem; width: 100%; }
}
/* --- Navigation Default Colors (Customer) --- */
.nav-divider {
    color: rgba(255, 255, 255, 0.4);
}
.welcome-text {
    color: #ffde7a;
}

/* --- Navigation Admin Colors --- */
nav.admin-nav {
    background-color: var(--cream-bg);
    border-bottom: 2px solid var(--mustard-gold);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

nav.admin-nav .brand-name {
    color: var(--dark-brown);
}

nav.admin-nav .nav-links li a {
    color: var(--dark-brown);
}

nav.admin-nav .nav-links li a:hover {
    color: var(--mustard-gold-dark);
}

nav.admin-nav .welcome-text {
    color: var(--mustard-gold-dark);
}

nav.admin-nav .nav-divider {
    color: rgba(0, 0, 0, 0.2);
}

/* === RESPONSIVE NAV & MOBILE LAYOUT === */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--mustard-gold);
    transition: all 0.3s ease;
}

/* Base styles adjustments for responsiveness */
img {
    max-width: 100%;
    height: auto;
}

.form-container, .card, .dashboard-container {
    max-width: 100%;
    overflow-x: hidden;
}

.dashboard-table-wrapper {
    overflow-x: auto;
}

/* Overlay for mobile drawer */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 768px) {
    nav {
        flex-wrap: nowrap;
        padding: 15px 20px;
        position: relative;
        justify-content: left;
    }
    
    .nav-logo {
        height: 50px;
    }
    
    .brand-name {
        font-size: 1.1rem;
        max-width: 55vw; /* Ensure it doesn't overlap with the hamburger menu */
        line-height: 1.2;
        white-space: normal;
    }

    .brand-container {
        margin: 0;
        justify-content: flex-start;
        display: flex;
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        right: 20px;
        top: 25px;
        z-index: 1001;
    }

    /* Animate Hamburger to X */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Side Drawer Navigation */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -300px;
        width: 260px;
        height: 100vh;
        box-sizing: border-box; /* Crucial: includes padding in 100vh height */
        background-color: var(--dark-brown);
        padding: 80px 20px 80px 20px; /* Space for the X button and extra at bottom */
        gap: 20px;
        z-index: 1000;
        align-items: stretch;
        box-shadow: -4px 0 15px rgba(0,0,0,0.2);
        transition: right 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        overflow-y: auto;
    }
    
    nav.admin-nav .nav-links {
        background-color: var(--cream-bg);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li a {
        font-size: 1.25rem;
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav.admin-nav .nav-links li a {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .nav-divider {
        display: none;
    }
    
    .user-menu {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100%;
        margin-top: 10px;
    }
    
    .nav-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: rgba(202, 201, 201, 0.05);
        padding-left: 20px;
        margin-top: 5px;
        border-radius: 8px;
    }
    
    nav.admin-nav .nav-dropdown-menu {
        background: rgba(0,0,0,0.03);
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
        animation: fadeInDown 0.3s ease;
    }
    
    @keyframes fadeInDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .product-grid {
        padding: 15px;
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 10px;
    }
    
    .dashboard-table {
        font-size: 0.9rem;
    }
    .dashboard-table th, .dashboard-table td {
        padding: 10px;
    }
    .production-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 0 !important;
        margin-top: 15px !important;
    }

    .production-search-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    .production-buttons-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .production-buttons-wrapper .btn {
        margin-left: 0 !important; /* Removes the inline margin-left: 10px */
        width: 100% !important;    /* Makes buttons uniform width when stacked */
        text-align: center !important;
    }
}

.strike-diagonal {
    position: relative;
    display: inline-block;
    color: black;
}

.strike-diagonal::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10%;
    width: 120%;
    height: 2px;
    background-color: red;
    transform: translateY(-50%) rotate(-15deg);
}

.sale-price {
    color: red;
    font-weight: bold;
    margin-left: 8px;
}

/* 3D Radio Button Styles for Variations */
.variation-radio-label {
    display: block;
    cursor: pointer;
}
.variation-radio-button {
    color: white;
    background: linear-gradient(to bottom, #d4a373, #a67c52);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 0 #7a5a3a, 0 5px 5px rgba(0,0,0,0.3);
    border: none;
    font-family: sans-serif;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    transition: all 0.1s ease-in-out;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    margin-bottom: 4px;
    font-weight: bold;
}
input[type="radio"]:checked + .variation-radio-button {
    background: linear-gradient(to bottom, var(--sage-green), #5c6e46);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.4), 0 0 0 #4a5937, 0 1px 1px rgba(255,255,255,0.3);
    transform: translateY(4px);
    margin-bottom: 0px;
    margin-top: 4px;
    color: #fff;
}
.variation-radio-label:active .variation-radio-button {
    transform: translateY(4px);
    margin-bottom: 0px;
    margin-top: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 #7a5a3a, 0 1px 2px rgba(0,0,0,0.3);
}
input[type="radio"]:checked + .variation-radio-button:active {
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.4), 0 0 0 #4a5937, 0 1px 1px rgba(255,255,255,0.3);
}

