/* public_html/style.css */

/* =========================================
   1. GLOBAL SHOP STYLES
   ========================================= */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; padding: 0;
    background-color: #f9f9f9; color: #333; line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
* { box-sizing: border-box; }

/* --- NYT STYLE HEADER (Sticky + Border) --- */
.announcement-bar {
    background-color: #000; color: #fff; text-align: center;
    padding: 8px 10px; font-size: 13px; font-weight: 500;
    letter-spacing: 0.5px; text-transform: uppercase;
    position: relative; z-index: 101;
}

.navbar {
    background: #ffffff; padding: 0 40px; height: 70px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
    box-shadow: none !important; border-bottom: 1px solid #e2e2e2;
}

.logo { display: flex; align-items: center; }
.logo img { height: 35px; width: auto; object-fit: contain; }

.nav-links { display: flex; gap: 20px; }
.nav-links a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600; font-size: 14px; text-transform: uppercase;
    letter-spacing: 0.5px; color: #000; transition: 0.2s;
}
.nav-links a:hover { color: #555; }

.nav-icons { display: flex; align-items: center; gap: 20px; }
.icon-link {
    display: flex; align-items: center; gap: 8px; text-decoration: none;
    color: #333; font-size: 1.2rem; position: relative; transition: color 0.2s;
}
.icon-link:hover { color: #000; }

.user-greeting { font-size: 0.85rem; font-weight: 600; text-transform: none; }
.cart-count {
    background: #e74c3c; color: white; padding: 2px 6px;
    border-radius: 50%; font-size: 0.7rem; position: absolute;
    top: -8px; right: -10px; font-weight: bold;
}

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; color: #333; }

/* --- SHOP LAYOUT --- */
.hero { text-align: center; padding: 80px 20px; background: #fff; margin-bottom: 40px; border-bottom: 1px solid #eee; }
.hero h1 { font-size: 3rem; margin: 0 0 10px 0; letter-spacing: -2px; }
.hero p { color: #888; font-size: 1.2rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; padding-bottom: 60px; }
.product-card { background: white; border-radius: 0; overflow: hidden; transition: transform 0.2s; border: 1px solid #eee; }
.product-card:hover { transform: translateY(-5px); }
.product-image { width: 100%; height: 300px; object-fit: cover; background: #f9f9f9; }
.product-info { padding: 15px; text-align: center; }
.product-title { font-size: 1rem; font-weight: 600; margin: 10px 0 5px 0; }
.product-price { color: #555; font-size: 0.95rem; margin-bottom: 15px; }

.btn { display: block; width: 100%; text-align: center; background: #000; color: white; padding: 10px; border-radius: 4px; font-weight: 600; border: none; cursor: pointer; transition: background 0.2s; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.btn:hover { background: #333; }
.btn-primary { background: #000; color: white; padding: 15px; width: 100%; border: none; border-radius: 4px; font-size: 1rem; font-weight: bold; cursor: pointer; }

/* Tables & Forms */
.cart-table { width: 100%; border-collapse: collapse; background: white; margin-top: 20px; border: 1px solid #eee; }
.cart-table th, .cart-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.cart-table th { background: #f9f9f9; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }

.form-box { background: white; padding: 40px; border: 1px solid #eee; max-width: 500px; margin: 40px auto; }
.form-group { margin-bottom: 20px; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; }


/* =========================================
   2. PREMIUM ADMIN DASHBOARD STYLES
   ========================================= */

body.admin-body { margin: 0; padding: 0; background-color: #f3f4f6; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; display: flex; min-height: 100vh; width: 100%; overflow-x: hidden; }

/* Sidebar (Desktop Default) */
.admin-sidebar {
    width: 260px; background-color: #1f2937; color: white;
    display: flex; flex-direction: column; position: fixed;
    height: 100vh; left: 0; top: 0; z-index: 1000; transition: transform 0.3s ease-in-out;
}
.sidebar-logo { height: 70px; display: flex; align-items: center; padding: 0 25px; font-size: 20px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-menu { list-style: none; padding: 20px 0; margin: 0; }
.sidebar-menu li a { display: flex; align-items: center; gap: 10px; padding: 15px 25px; color: #9ca3af; text-decoration: none; border-left: 4px solid transparent; transition: 0.2s; }
.sidebar-menu li a:hover, .sidebar-menu li a.active { background-color: rgba(255,255,255,0.05); color: white; border-left-color: #6366f1; }

/* Main Content (Desktop Default) */
.admin-main {
    margin-left: 260px; flex-grow: 1; display: flex; flex-direction: column; width: calc(100% - 260px); transition: 0.3s;
}
.admin-header {
    height: 70px; background: white; border-bottom: 1px solid #e5e7eb;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 30px; position: sticky; top: 0; z-index: 90;
}
.admin-content { padding: 30px; overflow-y: auto; }

/* Hamburger inside Admin Header */
.admin-hamburger {
    display: none; /* Hidden on Desktop */
    background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #333;
}

/* Overlay for Mobile Sidebar */
.admin-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 900;
}
.admin-overlay.active { display: block; }

/* Admin Cards & Tables */
.card { background: white; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 30px; border: 1px solid #e5e7eb; }
.card-header { padding: 20px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.table-responsive { width: 100%; overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
table.admin-table th { background: #f9fafb; text-align: left; padding: 12px 20px; font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; border-bottom: 1px solid #e5e7eb; }
table.admin-table td { padding: 16px 20px; border-bottom: 1px solid #e5e7eb; color: #374151; font-size: 14px; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; z-index: 2000; }
.modal-overlay.active { display: flex !important; }
.modal-box { background: white; width: 500px; max-width: 90%; border-radius: 8px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; }
.modal-header { background: #f9fafb; padding: 15px 20px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; overflow-y: auto; }


/* =========================================
   3. MOBILE RESPONSIVE UPDATES
   ========================================= */

/* --- A. SHOP HEADER --- */
@media (max-width: 768px) {
    .navbar { padding: 0 20px; height: 60px; }
    .hamburger { display: block; flex: 1; }
    .logo { flex: 1; justify-content: center; }
    .nav-icons { flex: 1; justify-content: flex-end; gap: 15px; }
    .user-greeting { display: none; }
    .nav-links {
        position: absolute; top: 100%; left: 0; width: 100%; background: white;
        flex-direction: column; align-items: center; z-index: 99;
        display: flex; max-height: 0; overflow: hidden; opacity: 0;
        transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
        border-top: 0 solid #eee; box-shadow: none;
    }
    .nav-links.active {
        max-height: 500px; opacity: 1; border-top: 1px solid #eee; box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    }
    .nav-links a { display: block; width: 100%; text-align: center; padding: 15px 0; border-bottom: 1px solid #f9f9f9; margin: 0; }
}


/* --- B. ADMIN MOBILE RESPONSIVE (DRAWER STYLE) --- */
@media (max-width: 900px) {
    /* 1. Hide Sidebar Off-Screen */
    .admin-sidebar {
        transform: translateX(-100%); /* Move left out of view */
        width: 260px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    /* 2. Show Sidebar when Active */
    .admin-sidebar.active {
        transform: translateX(0); /* Slide in */
    }

    /* 3. Main Content takes Full Width */
    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    /* 4. Show Hamburger */
    .admin-hamburger {
        display: block;
    }

    /* 5. Adjust Header Padding */
    .admin-header {
        padding: 0 15px;
    }
    .admin-content {
        padding: 15px;
    }
}


/* --- C. GLOBAL MOBILE TWEAKS --- */
@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .hero { padding: 50px 20px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-image { height: 200px; }
    .form-box { padding: 20px; margin: 20px auto; }
}


/* --- SLIDING CART DRAWER --- */
.cart-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: 0.3s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
    position: fixed; top: 0; right: -400px; width: 350px; max-width: 90%; height: 100vh;
    background: white; z-index: 1000; box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.drawer-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.drawer-body { padding: 20px; flex-grow: 1; overflow-y: auto; }
.drawer-footer { padding: 20px; border-top: 1px solid #eee; background: #f9f9f9; }
.mini-item { display: flex; gap: 15px; margin-bottom: 20px; }
.mini-img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; }
.mini-info { flex-grow: 1; }
.mini-title { font-size: 0.9rem; font-weight: 600; margin: 0 0 5px 0; }
.mini-price { font-size: 0.85rem; color: #666; }
.close-drawer { cursor: pointer; font-size: 1.5rem; background: none; border: none; }
.qty-group { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.qty-btn { background: #f3f4f6; border: none; width: 30px; height: 30px; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #333; transition: 0.2s; }
.qty-btn:hover { background: #e5e7eb; }
.qty-input { width: 40px; height: 30px; text-align: center; border: none; border-left: 1px solid #ddd; border-right: 1px solid #ddd; font-size: 0.9rem; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.flying-img {
    position: fixed; z-index: 9999; width: 50px; height: 50px; object-fit: cover; border-radius: 50%;
    opacity: 1; pointer-events: none; transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}