* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Layout helper: make the page a column flex so footer can stick to bottom on short pages */
html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main.container,
.main-content,
main {
    flex: 1 0 auto;
    /* allow main content to grow and push footer to bottom */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    position: sticky;
    /* keep header visible and interactive at the top */
    top: 0;
    z-index: 10000;
    /* above page content and notifications so it receives clicks; still below modals (10010+) */
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

.header-top {
    background: rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
    color: #FCD34D;
}

.social-links a {
    color: white;
    margin-left: 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #FCD34D;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Mobile menu toggle - hidden on desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 100;
}

/* Desktop layout: Logo on LEFT */
.logo {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    order: 1;
}

/* Desktop layout: Navigation in CENTER */
.nav {
    order: 2;
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Desktop layout: Actions (Login/Icons) on RIGHT */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    order: 3;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
}

.logo i {
    font-size: 32px;
    margin-right: 10px;
    color: #FCD34D;
}

/* Constrain logo heading to prevent very tall headers when the h1 wraps
   - keep a compact line-height and no extra margin so header stays stable
   - allow the logo to stack on very small screens via media queries */
.logo h1 {
    font-size: 28px;
    /* match logo font-size */
    line-height: 1;
    /* compact line height to avoid extra vertical space */
    margin: 0;
    /* remove default h1 margins */
    padding: 0;
    white-space: normal;
}

/* If the site title needs to appear on two lines visually, use a smaller
   font-size on narrow screens rather than large default sizes that increase
   header height */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 22px;
    }
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-list a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

/* ensure nav links receive pointer events */
.nav-list a,
.header-actions a,
.header-actions button {
    pointer-events: auto;
}

/* Ensure header elements are interactive */
.header,
.header * {
    pointer-events: auto;
}

.nav-list a:hover {
    color: #FCD34D;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FCD34D;
    transition: width 0.3s ease;
}

.nav-list a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions a {
    color: white;
    text-decoration: none;
    position: relative;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.header-actions a:hover {
    transform: scale(1.1);
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.user-menu-toggle:focus-visible {
    outline: 2px solid #FCD34D;
    outline-offset: 4px;
}

.user-menu:hover .user-menu-toggle,
.user-menu:focus-within .user-menu-toggle {
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    color: #111827;
    min-width: 190px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    display: none;
    flex-direction: column;
    width: 210px;
    z-index: 11000;
}


/* Dropdown is controlled by JavaScript in user/js/header.js */


.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.user-dropdown a:hover {
    background: #F3F4F6;
    color: #8B5CF6;
}

.user-dropdown .logout-link {
    color: #EF4444;
}

.user-dropdown .logout-link:hover {
    background: #FEF2F2;
    color: #B91C1C;
}

.wishlist-count,
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hamburger animation when active */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    color: #6B7280;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: white;
    color: #8B5CF6;
    border: 2px solid #8B5CF6;
}

.btn-secondary:hover {
    background: #8B5CF6;
    color: white;
    transform: translateY(-2px);
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #1F2937;
}

.section-header p {
    font-size: 18px;
    color: #6B7280;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1F2937;
}

.feature-card p {
    color: #6B7280;
    line-height: 1.6;
}

/* Quick Access Section */
.quick-access {
    padding: 80px 0;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.quick-access-card {
    background: white;
    padding: 40px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.quick-access-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.quick-access-card.admin-card {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.quick-access-card.admin-card .card-icon {
    background: rgba(255, 255, 255, 0.2);
}

.quick-access-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.quick-access-card p {
    color: #6B7280;
}

.quick-access-card.admin-card p {
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.footer {
    background: #1F2937;
    color: white;
    padding: 40px 0 18px;
    /* slightly reduced top padding for consistent height */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo i {
    font-size: 32px;
    margin-right: 10px;
    color: #FCD34D;
}

.footer-logo h3 {
    font-size: 24px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: #FCD34D;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #D1D5DB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #FCD34D;
}

.footer-section p {
    margin-bottom: 10px;
    color: #D1D5DB;
}

.footer-section p i {
    margin-right: 10px;
    color: #FCD34D;
}

.footer-bottom {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #374151;
    color: #9CA3AF;
}

/* Ensure footer content doesn't overlap on small screens and has consistent spacing */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0 12px;
    }

    .footer-content {
        gap: 20px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.notification-success {
    border-left-color: #27ae60;
}

.notification-error {
    border-left-color: #e74c3c;
}

.notification-warning {
    border-left-color: #f39c12;
}

.notification-info {
    border-left-color: #3498db;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-success .notification-content i {
    color: #27ae60;
}

.notification-error .notification-content i {
    color: #e74c3c;
}

.notification-warning .notification-content i {
    color: #f39c12;
}

.notification-info .notification-content i {
    color: #3498db;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Fix SweetAlert z-index to appear above custom modals (10010) */
.swal2-container {
    z-index: 20000 !important;
}