/* ===================================
   Restaurant Website - Complete CSS
   Modern, Responsive & SEO Optimized
   =================================== */

/* CSS Variables for Easy Customization */
:root {
    --primary-color: #d4af37;
    --secondary-color: #1a1a1a;
    --accent-color: #ff6b35;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Playfair Display', serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    color: var(--secondary-color);
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #c19d2f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #333;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

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

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.header-top {
    background: var(--secondary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    gap: 25px;
}

.header-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-social a {
    color: var(--white);
    margin-left: 15px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.header-social a:hover {
    color: var(--primary-color);
}

.navbar {
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--secondary-color);
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--white);
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition);
}

/* Hero Slider */
.hero-slider {
    margin-top: 120px;
    position: relative;
    height: 600px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

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

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 2;
    width: 90%;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.slide-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 3;
}

.slider-arrow:hover {
    background: var(--primary-color);
}

.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

/* Features Section */
.features {
    background: var(--light-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.feature-card h3 {
    margin-bottom: 10px;
}

/* Menu Section */
.menu-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.menu-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.menu-item-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.menu-item:hover .menu-item-image img {
    transform: scale(1.1);
}

.menu-item-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.menu-item-content {
    padding: 20px;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.menu-item-title {
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.menu-item-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.menu-item-description {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.menu-item-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray);
}

.menu-item-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    flex: 1;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: #c19d2f;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    align-items: center;
}

.about-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.about-text h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--gray);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 15px;
}

.about-feature i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Booking Form */
.booking-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.checkout-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Cart */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    transition: var(--transition);
    z-index: 1001;
    overflow-y: auto;
}

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

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.cart-close {
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.qty-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cart-footer {
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-section p {
    margin-bottom: 15px;
    color: #ccc;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #ccc;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary-color);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ccc;
}

/* User Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 120px;
    min-height: calc(100vh - 200px);
}

.dashboard-sidebar {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    height: fit-content;
    box-shadow: var(--box-shadow);
}

.dashboard-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-menu a {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-menu a:hover,
.dashboard-menu a.active {
    background: var(--primary-color);
    color: var(--white);
}

.dashboard-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #c19d2f);
    color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--secondary-color);
}

table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d1ecf1; color: #0c5460; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Loading Spinner */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        order: 2;
    }
}

.checkoutpage-address {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: start;
}

@media (max-width: 968px) {
    .checkoutpage-address {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-top {
        display: none;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 300px;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: var(--transition);
        align-items: flex-start;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-slider {
        height: 400px;
        margin-top: 70px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .slider-arrow.prev { left: 15px; }
    .slider-arrow.next { right: 15px; }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .about-content {
        gap: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 50px 0;
    }
    
    .booking-form {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-login {
        display: none;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .hero-slider,
    .btn,
    .nav-actions {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.menu-item {
    display: flex;
    flex-direction: column;
    height: 100%; /* Make all cards equal height */
}

.menu-item-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.menu-item-description {
    margin-bottom: auto; /* pushes footer area down */
}

.menu-item-actions {
    margin-top: auto; /* forces Add to Cart button to bottom */
}