/* ==========================================
   ШРИФТЫ И ПЕРЕМЕННЫЕ
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --primary-green: #2c4a3b;
    --accent-gold: #c5a880;
    --bg-cream: #f9f7f2;
    --text-dark: #2d2d2d;
    --text-light: #6b6b6b;
    --white: #ffffff;
    --border-color: #e6e2d8;
    --shadow-soft: 0 4px 20px rgba(44, 74, 59, 0.08);
    --shadow-hover: 0 8px 30px rgba(44, 74, 59, 0.12);
    --radius-card: 16px;
    --radius-btn: 30px;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--primary-green); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* HEADER С ФОНОМ И ПОДЛОЖКОЙ ВЕНГЕ */
.header {
    background: linear-gradient(rgba(75, 54, 33, 0.85), rgba(75, 54, 33, 0.9)), 
                url('https://turbazalosvido.by/wp-content/uploads/2026/08/cafe_4.webp') center/cover no-repeat;
    color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky; top: 0; z-index: 100;
}
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.logo-area { display: flex; align-items: center; gap: 15px; }

/* ЛОГОТИП - УВЕЛИЧЕН В 2 РАЗА */
.site-logo { height: 120px; width: auto; }

.logo-text h1 { color: var(--white); font-size: 24px; margin: 0; }
.logo-text p { color: var(--accent-gold); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.nav { display: flex; gap: 20px; align-items: center; }
.nav-link { color: rgba(255,255,255,0.8); text-decoration: none; font-weight: 500; transition: 0.3s; }
.nav-link:hover, .nav-link.active { color: var(--white); }
.cart-badge { background: var(--accent-gold); color: #4B3621; border-radius: 50%; padding: 2px 6px; font-size: 11px; vertical-align: top; }
.btn-logout { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: var(--white); padding: 6px 15px; border-radius: 20px; cursor: pointer; transition: 0.3s; }
.btn-logout:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

/* USER BAR */
.user-info-bar { background: var(--primary-green); color: white; padding: 8px 0; font-size: 13px; text-align: center; }
.user-info-bar strong { color: var(--accent-gold); }

/* MAIN CONTENT */
.main-content { flex: 1; padding: 30px 0; }
.page { display: none; animation: fadeIn 0.4s; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ФОН ЛЕСНОЙ ЧАЩИ */
.main-content.with-forest-bg {
    background: linear-gradient(rgba(44, 74, 59, 0.88), rgba(44, 74, 59, 0.75)), 
                url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat fixed;
    background-attachment: fixed;
}

/* SELECTORS & CATEGORIES */
.order-type-selector, .time-selector, .category-header, .order-comment-section {
    background: var(--white); padding: 25px; border-radius: var(--radius-card);
    margin-bottom: 20px; box-shadow: var(--shadow-soft); border: 1px solid var(--border-color);
}
.order-type-selector h2 { font-size: 24px; margin-bottom: 20px; text-align: center; }
.type-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; }
.type-btn {
    background: var(--bg-cream); border: 1px solid var(--border-color); padding: 15px;
    border-radius: 12px; cursor: pointer; font-weight: 600; transition: 0.3s; width: 100%;
}
.type-btn.active { background: var(--primary-green); color: white; border-color: var(--primary-green); }

.time-selector { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.time-selector label { font-weight: 600; color: var(--primary-green); }
.time-selector input[type="time"], .time-selector input[type="date"] { 
    padding: 10px 15px; border: 1px solid var(--border-color); border-radius: 8px; 
    background: var(--bg-cream); font-family: 'Montserrat', sans-serif; 
}

.order-comment-section label { 
    display: block; margin-bottom: 10px; font-weight: 600; color: var(--primary-green); 
}
.order-comment-section textarea { 
    width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; 
    font-family: 'Montserrat', sans-serif; font-size: 14px; resize: vertical; 
    background: var(--bg-cream);
}
.order-comment-section textarea:focus {
    outline: none; border-color: var(--primary-green); background: var(--white);
    box-shadow: 0 0 0 3px rgba(44, 74, 59, 0.1);
}

.menu-categories { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; }
.category-btn {
    background: var(--white); border: 1px solid var(--border-color); padding: 10px 20px;
    border-radius: 25px; cursor: pointer; font-weight: 600; transition: 0.3s; white-space: nowrap;
}
.category-btn.active { background: var(--primary-green); color: white; border-color: var(--primary-green); }

/* MENU ITEMS */
.category-header h3 { font-size: 22px; margin-bottom: 10px; }
.info-text { color: var(--text-light); font-size: 15px; margin-bottom: 15px; }
.info-text.warning { color: #cc5555; font-weight: 600; }
.guests-counter { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 15px 20px; background: var(--bg-cream); border-radius: 10px; border: 1px dashed var(--accent-gold); }
.guests-counter input { width: 60px; padding: 8px; border: 1px solid var(--border-color); border-radius: 6px; text-align: center; background: var(--white); }
#breakfast-limit { font-weight: 700; color: var(--primary-green); margin-left: auto; }
h4 { color: var(--primary-green); margin: 35px 0 20px 0; font-size: 24px; border-bottom: 2px solid var(--accent-gold); display: inline-block; padding-bottom: 5px; }

.menu-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 25px; margin-bottom: 40px; }
.menu-item {
    background: var(--white); border-radius: var(--radius-card); padding: 25px;
    box-shadow: var(--shadow-soft); transition: all 0.3s ease; position: relative;
    border: 1px solid transparent; display: flex; flex-direction: column; cursor: pointer;
    min-height: 280px;
}
.menu-item:hover { transform: translateY(-5px); border-color: var(--accent-gold); box-shadow: var(--shadow-hover); }

/* КАРТОЧКА С ВИДЕО */
.menu-item.has-video {
    border: 2px solid rgba(255, 87, 34, 0.6);
}
.menu-item.has-video:hover {
    border-color: #ff5722;
    box-shadow: 0 8px 30px rgba(255, 87, 34, 0.3), 0 4px 20px rgba(44, 74, 59, 0.2);
    transform: translateY(-5px) scale(1.02);
}

.menu-item-name { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; color: var(--primary-green); margin-bottom: 8px; }
.menu-item-desc-short { font-size: 13px; color: var(--text-light); margin-bottom: 15px; flex-grow: 1; line-height: 1.5; }
.menu-item-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--border-color); }
.menu-item-weight { font-size: 12px; color: #999; font-style: italic; }
.menu-item-price { font-weight: 700; color: var(--accent-gold); font-size: 18px; }

.free-badge { position: absolute; top: -12px; right: 20px; background: var(--accent-gold); color: white; padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; }

/* БЕЙДЖ ВИДЕО */
.video-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.video-badge::before {
    content: '▶';
    font-size: 10px;
}

.menu-item-actions { display: flex; gap: 12px; align-items: center; margin-top: 15px; }
.quantity-control { display: flex; align-items: center; gap: 8px; background: var(--bg-cream); padding: 4px; border-radius: 20px; }
.quantity-btn { width: 32px; height: 32px; border: none; background: white; color: var(--primary-green); border-radius: 50%; cursor: pointer; font-size: 18px; font-weight: bold; display: flex; align-items: center; justify-content: center; }
.quantity-btn:hover:not(:disabled) { background: var(--primary-green); color: white; }
.quantity-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.quantity-value { font-weight: 700; min-width: 24px; text-align: center; font-size: 15px; }
.add-to-cart-btn { background: var(--primary-green); color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: 600; transition: all 0.3s; flex: 1; font-family: 'Montserrat', sans-serif; font-size: 14px; }
.add-to-cart-btn:hover { background: #1e352a; transform: scale(1.02); }

/* МОДАЛЬНЫЕ ОКНА */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal.active { display: flex; }

/* МОДАЛКА ПРОСМОТРА ВИДЕО/ФОТО - НА ВЕСЬ ЭКРАН */
#product-modal {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.product-modal-content { 
    background: transparent; 
    width: 100%; 
    max-width: 900px; 
    padding: 0; 
    border-radius: 12px; 
    overflow: visible;
    position: relative; 
    display: flex; 
    flex-direction: column; 
    max-height: 90vh;
    box-shadow: none;
}

.close-modal { 
    position: fixed;
    top: 20px; 
    right: 30px; 
    font-size: 45px; 
    cursor: pointer; 
    color: white; 
    z-index: 1010; 
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    line-height: 1;
    font-weight: 300;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #ff5722;
}

.product-image-area { 
    width: 100%; 
    height: 85vh; 
    max-height: 750px;
    position: relative; 
    overflow: hidden;
    background: #000;
    border-radius: 12px;
}

.product-image-area img,
.product-image-area iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border: none;
}

/* МОДАЛКА ПОДТВЕРЖДЕНИЯ ЗАКАЗА */
.confirm-modal { background: rgba(0,0,0,0.4); }
.confirm-content { 
    background: var(--white); 
    padding: 40px; 
    border-radius: 24px; 
    max-width: 500px; 
    text-align: center; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border-top: 6px solid var(--primary-green);
}
.confirm-icon { font-size: 60px; margin-bottom: 15px; }
.confirm-content h3 { font-size: 32px; color: var(--primary-green); margin-bottom: 20px; }
.confirm-details { 
    background: var(--bg-cream); 
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: 15px; 
    text-align: left; 
    font-size: 15px; 
    line-height: 1.7;
    border: 1px solid var(--border-color);
}
.confirm-details strong { color: var(--primary-green); }
.download-hint { 
    background: #e3f2fd; 
    padding: 15px; 
    border-radius: 8px; 
    margin: 15px 0; 
    border-left: 4px solid #2196f3;
    font-size: 14px;
}
.confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* CART & ADMIN */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-light); font-size: 18px; background: white; border-radius: var(--radius-card); border: 1px dashed var(--border-color); }
.cart-items { background: white; border-radius: var(--radius-card); padding: 25px; margin-bottom: 25px; box-shadow: var(--shadow-soft); }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--border-color); }
.cart-item:last-child { border-bottom: none; }
.cart-item-name { font-weight: 600; margin-bottom: 4px; color: var(--text-dark); }
.cart-item-price { color: var(--primary-green); font-weight: 700; font-size: 15px; }
.cart-item-actions { display: flex; align-items: center; gap: 15px; }
.remove-btn { background: transparent; color: #cc5555; border: 1px solid #eebbbb; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
.remove-btn:hover { background: #cc5555; color: white; border-color: #cc5555; }
.phone-input-section { background: white; padding: 20px; border-radius: var(--radius-card); margin-bottom: 20px; box-shadow: var(--shadow-soft); }
.phone-input-section label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--primary-green); }
.phone-input-section input { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 16px; font-family: 'Montserrat', sans-serif; }
.cart-summary { background: white; padding: 30px; border-radius: var(--radius-card); box-shadow: var(--shadow-soft); border-top: 4px solid var(--accent-gold); }
.summary-row { display: flex; justify-content: space-between; padding: 12px 0; font-size: 16px; color: var(--text-dark); }
.summary-row.total { border-top: 1px solid var(--border-color); margin-top: 15px; padding-top: 20px; font-size: 22px; font-weight: 700; color: #4B3621; font-family: 'Playfair Display', serif; }
.payment-info { text-align: center; color: var(--text-light); margin: 25px 0; font-size: 14px; background: var(--bg-cream); padding: 10px; border-radius: 8px; }
.cart-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* ADMIN PANEL */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 20px; border-radius: var(--radius-card); text-align: center; box-shadow: var(--shadow-soft); border-left: 4px solid var(--accent-gold); }
.stat-card.highlight { border-left-color: var(--primary-green); background: #f0f7f4; }
.stat-num { display: block; font-size: 32px; font-weight: 700; color: var(--primary-green); font-family: 'Playfair Display', serif; }
.stat-label { font-size: 14px; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.admin-table-container { overflow-x: auto; background: white; border-radius: var(--radius-card); box-shadow: var(--shadow-soft); padding: 20px; }
.admin-order-card { border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; margin-bottom: 15px; transition: 0.3s; position: relative; }
.admin-order-card:hover { border-color: var(--accent-gold); }
.admin-order-header { display: flex; justify-content: space-between; margin-bottom: 10px; border-bottom: 1px dashed var(--border-color); padding-bottom: 10px; }
.admin-order-id { font-weight: 700; color: var(--primary-green); font-family: 'Playfair Display', serif; font-size: 18px; }
.admin-order-status { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.status-new { background: #e3f2fd; color: #1565c0; }
.status-ready { background: #e8f5e9; color: #2e7d32; }
.status-done { background: #f5f5f5; color: #616161; }
.admin-order-info { font-size: 14px; color: var(--text-dark); margin-bottom: 10px; }
.admin-order-items { font-size: 13px; color: var(--text-light); margin-bottom: 15px; line-height: 1.5; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 15px; cursor: pointer; border: none; font-weight: 600; }
.btn-status { background: var(--primary-green); color: white; }
.btn-print { background: var(--bg-cream); color: var(--text-dark); border: 1px solid var(--border-color); }

/* FOOTER С ФОНОМ И ПОДЛОЖКОЙ ВЕНГЕ */
.footer { 
    background: linear-gradient(rgba(75, 54, 33, 0.88), rgba(75, 54, 33, 0.92)), 
                url('https://turbazalosvido.by/wp-content/uploads/2026/08/cafe_3.webp') center/cover no-repeat;
    color: rgba(255,255,255,0.75); 
    padding: 40px 0 20px; 
    margin-top: auto;
}
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; }
.footer h4 { color: var(--white); margin-bottom: 15px; font-size: 18px; }
.footer p { margin-bottom: 8px; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.admin-link { color: rgba(255,255,255,0.4); cursor: pointer; transition: 0.3s; font-size: 12px; }
.admin-link:hover { color: var(--accent-gold); }

/* BUTTONS */
.btn-primary { background: var(--primary-green); color: white; border: none; padding: 12px 30px; border-radius: var(--radius-btn); cursor: pointer; font-weight: 600; transition: 0.3s; font-family: 'Montserrat', sans-serif; letter-spacing: 0.5px; }
.btn-primary:hover { background: #1e352a; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(44, 74, 59, 0.3); }
.btn-secondary { background: transparent; color: var(--text-dark); border: 1px solid var(--border-color); padding: 12px 30px; border-radius: var(--radius-btn); cursor: pointer; font-weight: 600; transition: all 0.3s; font-family: 'Montserrat', sans-serif; }
.btn-secondary:hover { border-color: var(--primary-green); color: var(--primary-green); background: var(--white); }
.btn-large { width: 100%; padding: 16px; font-size: 18px; margin-top: 10px; }

/* LOGIN PAGE */
.login-container { 
    min-height: 100vh; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 20px; 
    background: linear-gradient(rgba(44, 74, 59, 0.85), rgba(44, 74, 59, 0.7)), 
                url('https://turbazalosvido.by/wp-content/uploads/2026/08/cafe_bn.webp') center/cover no-repeat;
}
.login-card { background: var(--white); padding: 50px 40px; border-radius: var(--radius-card); box-shadow: 0 20px 50px rgba(0,0,0,0.2); max-width: 480px; width: 100%; text-align: center; border-top: 4px solid var(--accent-gold); }
.login-card h1 { font-size: 36px; margin-bottom: 8px; }
.subtitle { color: var(--text-light); margin-bottom: 35px; font-size: 15px; text-transform: uppercase; letter-spacing: 1px; }
.form-group { margin-bottom: 24px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--primary-green); font-size: 14px; }
.form-group input { width: 100%; padding: 14px 18px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 16px; background: var(--bg-cream); transition: all 0.3s ease; font-family: 'Montserrat', sans-serif; }
.form-group input:focus { outline: none; border-color: var(--primary-green); background: var(--white); box-shadow: 0 0 0 3px rgba(44, 74, 59, 0.1); }

@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 15px; padding: 15px; }
    .nav { width: 100%; justify-content: center; flex-wrap: wrap; gap: 15px; }
    .menu-items-grid { grid-template-columns: 1fr; }
    .type-buttons { grid-template-columns: 1fr; }
    .cart-item { flex-direction: column; align-items: flex-start; gap: 15px; }
    .user-info-bar .container { flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }
    .login-card { padding: 30px 20px; }
    .order-type-selector, .time-selector, .category-header, .order-comment-section { padding: 20px; }
    .footer-bottom { flex-direction: column; gap: 10px; }
    .main-content.with-forest-bg {
        background-attachment: scroll;
    }
    .video-badge {
        font-size: 10px;
        padding: 5px 12px;
        top: -10px;
        left: 15px;
    }
    .product-image-area { 
        height: 70vh; 
        max-height: 500px;
    }
    .close-modal {
        font-size: 35px;
        top: 15px;
        right: 20px;
    }
    .time-selector { flex-direction: column; align-items: stretch; }
    .time-selector input[type="time"], .time-selector input[type="date"] { width: 100%; margin-top: 5px; }
    .confirm-actions { flex-direction: column; }
    .confirm-actions button { width: 100%; }
    /* Логотип на мобильных */
    .site-logo { height: 80px; }
}

@media(min-width: 768px) { 
    .product-modal-content { flex-direction: row; }
    .product-image-area { min-height: 400px; }
}