/* Lamio E-commerce App - style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: Poppins, sans-serif;
    background: #F6F5F2;
    color: #1C1C1C;
}

img, video {
    max-width: 100%;
    height: auto;
}

button {
    touch-action: manipulation;
}

#loader {
    position: fixed;
    inset: 0;
    background: rgba(128, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    text-align: center;
    font-family: Poppins, sans-serif;
}

.loader-content img {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    animation: fadePulse 1.5s infinite ease-in-out;
}

.loader-content p {
    font-size: 14px;
    color: #ffffff;
    letter-spacing: 2px;
}

@keyframes fadePulse {
    0% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.4; transform: scale(0.95); }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    background: rgba(128, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

nav ul { display: flex; gap: 30px; list-style: none; align-items: center; }

nav ul li a {
    text-decoration: none;
    color: white;
    opacity: .85;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
}

nav ul li a:hover { opacity: 1; color: #D4AF37; }

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    visibility: hidden;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    min-width: 200px;
    padding: 8px 0;
    z-index: 2000;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    pointer-events: none;
}

.nav-dropdown-menu.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
    font-size: 16px;
}

.toggle-password:hover {
    color: #D4AF37;
}

.a{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: #333 !important;
    font-size: 14px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
    transition: background 0.2s;
    text-decoration: none;
}

.a:hover {
    background: #fdf5f5;
    color: #800000 !important;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: #333 !important;
    font-size: 14px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
    transition: background 0.2s;
    text-decoration: none;
}

.nav-dropdown-menu a:hover {
    background: #fdf5f5;
    color: #800000 !important;
}

.nav-dropdown-menu a span {
    font-size: 16px;
    width: 22px;
    text-align: center;
}

.nav-dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 12px;
}

.dropdown-logout {
    color: #c0392b !important;
}

.dropdown-logout:hover {
    background: #fef2f2 !important;
    color: #c0392b !important;
}

.hero {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background: #800000;
}

.hero-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(128,0,0,0.75);
    z-index: 2;
}

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

.hero .logo img {
    opacity: 0;
    animation: fadeUp 1s ease-out forwards;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hero .logo img:hover { opacity: .9; transform: scale(1.05); }

.hero p {
    margin-top: 15px;
    font-size: 18px;
    opacity: 0;
    animation: fadeUp 1s ease-out 0.3s forwards;
}

.hero button {
    margin-top: 30px;
    padding: 14px 45px;
    background: #D4AF37;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    animation: fadeUp 1s ease-out 0.6s forwards;
    transition: transform 0.3s ease, background 0.3s;
}
.hero button:hover { background: #b8962e; transform: scale(1.05); }

.products { padding: 90px 8%; }

.products h2 {
    text-align: center;
    font-family: Poppins, sans-serif;
    font-size: 36px;
    margin-bottom: 60px;
    color: #800000;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    transition: .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 35px rgba(0,0,0,0.12); }

.card img {
    border-radius: 8px;
    height: 220px;
    object-fit: cover;
    width: 100%;
}

.card h3 { margin: 15px 0 5px; font-family: Poppins, sans-serif; font-size: 16px; }
.price { color: #D4AF37; font-weight: 600; font-size: 18px; }

.card button {
    margin-top: 12px;
    width: 100%;
    padding: 11px;
    border: none;
    background: #800000;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}
.card button:hover { background: #4d0000; }

footer {
    background: #800000;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    font-size: 14px;
    letter-spacing: 1px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    width: 380px;
    max-width: 95vw;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

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

.modal-content h3 {
    margin-bottom: 25px;
    font-family: Poppins, sans-serif;
    color: #800000;
    font-size: 22px;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content input[type="tel"],
.modal-content input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.modal-content input:focus {
    border-color: #800000;
    box-shadow: 0 0 0 3px rgba(128,0,0,0.08);
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: #800000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-family: Poppins, sans-serif;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
    letter-spacing: 0.5px;
}
.btn-primary:hover { background: #4d0000; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.close-btn {
    position: absolute;
    top: 12px; right: 18px;
    font-size: 26px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
    line-height: 1;
}
.close-btn:hover { color: #333; }

.welcome-modal-content {
    background: linear-gradient(160deg, #800000 0%, #4d0000 50%, #1a0000 100%);
    color: white;
    width: 420px;
    padding: 40px 45px;
}

.welcome-logo { text-align: center; margin-bottom: 28px; }

.auth-tabs {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.auth-tab.active { background: white; color: #800000; font-weight: 600; }

.auth-form input {
    background: rgba(255,255,255,0.12) !important;
    border: 1.5px solid rgba(255,255,255,0.2) !important;
    color: white !important;
    border-radius: 8px !important;
}
.auth-form input::placeholder { color: rgba(255,255,255,0.5) !important; }
.auth-form input:focus {
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15) !important;
    background: rgba(255,255,255,0.18) !important;
}
.auth-form .btn-primary { background: #D4AF37; margin-top: 8px; }
.auth-form .btn-primary:hover { background: #b8962e; }

.auth-switch-text { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,0.6); }
.auth-switch-text a { color: #D4AF37; text-decoration: none; font-weight: 500; }
.auth-switch-text a:hover { text-decoration: underline; }
.welcome-modal-content .close-btn { color: rgba(255,255,255,0.5); }
.welcome-modal-content .close-btn:hover { color: white; }

#cartModal .modal-content {
    max-height: 85vh;
    overflow-y: auto;
    text-align: left;
}

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

.cart-item img {
    width: 55px; 
    height: 55px;
    border-radius: 6px;
    object-fit: cover;
}

.cart-total {
    font-weight: 700;
    font-size: 20px;
    text-align: right;
    margin-top: 20px;
    color: #800000;
    font-family: Poppins, sans-serif;
}

.checkout-btn {
    background: linear-gradient(135deg, #800000, #D4AF37);
    font-size: 16px;
    font-weight: 600;
}

.checkout-modal-content {
    width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
}

.payment-options {
    display: grid;
    gap: 12px;
}

.address-card {
    padding: 14px 16px;
    border: 1px solid #e7dcdc;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.address-card:hover {
    transform: translateY(-1px);
    border-color: #d4af37;
    box-shadow: 0 8px 18px rgba(128, 0, 0, 0.06);
}

.address-card.selected {
    border-color: #800000;
    background: #fff5f3;
    box-shadow: 0 10px 22px rgba(128, 0, 0, 0.12);
}

.pm-tile {
    padding: 16px 18px;
    border: 1px solid #e6d8d8;
    border-radius: 12px;
    background: #fffaf8;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.pm-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(128, 0, 0, 0.08);
    border-color: #d4af37;
}

.pm-tile.selected {
    border-color: #800000;
    box-shadow: 0 12px 24px rgba(128, 0, 0, 0.12);
    background: #fff4ef;
}

.pm-tile.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: #ddd;
    background: #f6f6f6;
}

.pm-tile.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #ddd;
}

.admin-status-select {
    min-width: 160px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d8c7c7;
    background: #fff;
    font-family: Poppins, sans-serif;
    cursor: pointer;
}

.checkout-step-label {
    font-weight: 600;
    color: #800000;
    font-size: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.receipt-modal-content { max-width: 520px; text-align: left; }

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.receipt-success-tick { font-size: 40px; margin: 15px 0 5px; }

#userDashboard {
    display: none;
    padding: 60px 8%;
    background: white;
    border-top: 1px solid #eee;
    min-height: 60vh;
}

#userDashboard h2 {
    font-family: Poppins, sans-serif;
    color: #800000;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

.udash-tabs {
    display: flex;
    gap: 5px;
    background: #f9f0f0;
    border-radius: 12px;
    padding: 5px;
    max-width: 380px;
    margin: 0 auto 30px;
}

.udash-tab {
    flex: 1;
    padding: 11px;
    border: none;
    background: transparent;
    color: #800000;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.25s ease;
}
.udash-tab.active { background: #800000; color: white; box-shadow: 0 4px 12px rgba(128,0,0,0.2); }

.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #fff5f5, #fff);
    border-radius: 14px;
    border: 1px solid #f0dada;
    margin-bottom: 5px;
}

.profile-avatar {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, #800000, #D4AF37);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    color: white;
}

.profile-info h3 {
    font-family: Poppins, sans-serif;
    color: #800000;
    font-size: 20px;
    margin-bottom: 4px;
}

.order-history {
    overflow-x: auto;
}

.order-history table { width: 100%; border-collapse: collapse; margin-bottom: 30px; text-align: left; min-width: 600px; }
.order-history th, .order-history td { padding: 14px 12px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.order-history th {
    background: #fdf5f5;
    font-weight: 600;
    color: #800000;
    font-family: Poppins, sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.order-history tr:hover td { background: #fdf9f9; }

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-preparing { background: #FFF3CD; color: #856404; }
.status-out { background: #CCE5FF; color: #004085; }
.status-delivered { background: #D4EDDA; color: #155724; }

.shake {
    animation: shake 0.3s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-6px); }
    100% { transform: translateX(0); }
}

#adminDashboard {
    display: none;
    padding: 60px 8%;
    background: white;
    border-top: 1px solid #eee;
}

#adminDashboard h2 {
    font-family: Poppins, sans-serif;
    color: #800000;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

.admin-edit-form {
    background: #fdf5f5;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #f0dada;
}

.admin-form-group { margin-bottom: 14px; text-align: left; }

.admin-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-form-group input,
.admin-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}
.admin-form-group input:focus, .admin-form-group select:focus { border-color: #800000; }

.admin-product-row {
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 12px 16px;
    border: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: box-shadow 0.2s;
}
.admin-product-row:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.06); }

#ordersPage {
    display: none;
    padding: 60px 8%;
    background: white;
    border-top: 1px solid #eee;
    min-height: 60vh;
}

#ordersPage h2 {
    font-family: Poppins, sans-serif;
    color: #800000;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

.toast-container {
    position: fixed;
    bottom: 30px; right: 30px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    border-left: 5px solid #800000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68,-0.55,0.265,1.55);
    opacity: 0;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.success { border-left-color: #27ae60; }
.toast.error { border-left-color: #c0392b; }
.toast.info { border-left-color: #D4AF37; }
.toast-icon { font-size: 18px; }

.filter-tab {
    background: white;
    color: #333;
    border: 1.5px solid #e0e0e0;
    padding: 10px 30px;
    border-radius: 50px;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-tab:hover { border-color: #800000; color: #800000; }
.filter-tab.active { background: #800000; color: white; border-color: #800000; box-shadow: 0 4px 15px rgba(128,0,0,0.2); }

#catalogSearch { transition: all 0.3s ease; }
#catalogSearch:focus {
    outline: none !important;
    border-color: #800000 !important;
    box-shadow: 0 5px 25px rgba(128,0,0,0.1) !important;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 10px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    nav ul li a {
        font-size: 11px;
    }

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

    .hero {
        height: 70vh;
        padding: 20px;
    }

    .hero .logo img {
        height: 180px !important;
    }

    .hero p {
        font-size: 14px;
        margin-top: -40px !important;
    }

    .hero button {
        padding: 12px 30px;
        font-size: 14px;
    }

    .products,
    #userDashboard,
    #adminDashboard,
    #ordersPage {
        padding: 40px 5%;
    }
}

@media (max-width: 480px) {
    .modal-content,
    .welcome-modal-content,
    .checkout-modal-content {
        width: 95vw;
        padding: 20px 15px;
        border-radius: 12px;
    }

    .modal-content input,
    .auth-form input {
        font-size: 13px;
        padding: 10px;
    }

    .btn-primary {
        padding: 12px;
        font-size: 14px;
    }

    .toggle-password {
        right: 10px;
        font-size: 14px;
    }

    .card {
        padding: 15px;
    }

    .card img {
        height: 180px;
    }

    .toast-container {
        bottom: 15px;
        right: 15px;
        left: 15px;
    }

    .toast {
        min-width: unset;
        width: 100%;
    }
}


