/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVENESS FIXES
   Mobile-First Approach with Better Margins & Layout
   ============================================ */

/* Global Reset & Base Styles */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
    max-width: 100%;
}

/* Container with proper mobile margins */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Ensure all content respects container width */
.container > * {
    max-width: 100%;
}

/* Global content margin fixes */
main {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Apply proper margins to all main content */
main > *:not(.container) {
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
}

/* Special handling for hero sections and footers */
.hero-section,
.site-footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.hero-section .container,
.site-footer .container {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* User Menu Styles */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: none;
    cursor: pointer;
    transition: background var(--transition);
}

.user-menu-btn:hover {
    background: var(--bg-subtle);
}

.login-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background var(--transition);
}

.login-btn:hover {
    background: var(--bg-subtle);
}



/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 999;
    padding: var(--s6);
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu nav li {
    margin-bottom: var(--s4);
}

.mobile-menu nav a {
    display: block;
    padding: var(--s4);
    font-size: 18px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.mobile-menu nav a:hover {
    background: var(--bg-subtle);
}

/* Improved Logo */
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-main {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.logo-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-lighter);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Improved Search Bar */
#searchBar {
    padding: var(--s4) 0;
    border-top: 1px solid var(--border);
}

#searchBar form {
    display: flex;
    gap: var(--s3);
}

#searchBar input {
    flex: 1;
    padding: 0 var(--s4);
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
}

#searchBar button {
    padding: 0 var(--s6);
}

/* Cart & Wishlist Icons */
.cart-icon,
.wishlist-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: background var(--transition);
}

.cart-icon:hover,
.wishlist-icon:hover {
    background: var(--bg-subtle);
}

.cart-count,
.wishlist-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Hide hamburger on desktop */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-menu {
        display: none !important;
    }
}

/* Mobile Breakpoints - Mobile First Approach */

/* Base Mobile Styles (320px and up) */
@media (min-width: 320px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Typography scaling */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Button improvements */
    .btn {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    /* Form improvements */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    textarea,
    select {
        width: 100%;
        padding: 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
        margin-bottom: 1rem;
    }
    
    /* Card spacing */
    .product-card,
    .spotlight-card {
        margin-bottom: 1.5rem;
    }
}

/* Small Mobile (480px and up) */
@media (min-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .btn {
        width: auto;
        min-width: 120px;
        display: inline-block;
        margin-right: 0.5rem;
    }
}

/* Tablet Portrait (768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    /* Grid layouts start here */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .hero-spotlights {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Tablet Landscape (1024px and up) */
@media (min-width: 1024px) {
    .container {
        padding: 0 2.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (1280px and up) */
@media (min-width: 1280px) {
    .container {
        padding: 0 3rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop (1536px and up) */
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
        padding: 0 3rem;
    }
}
/* Mobile-Specific Styles (max-width: 767px) */
@media (max-width: 767px) {
    /* Hide desktop navigation */
    .main-nav {
        display: none;
    }
    
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Header adjustments */
    .header-content {
        height: 56px;
        padding: 0;
    }
    
    .logo svg {
        width: 28px;
        height: 28px;
    }
    
    .logo-main {
        font-size: 14px;
    }
    
    .logo-sub {
        font-size: 9px;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-actions button,
    .header-actions a {
        width: 32px;
        height: 32px;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-spotlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .spotlight-card {
        padding: 1.5rem;
        min-height: 280px;
    }
    
    .spotlight-number {
        font-size: 2rem;
    }
    
    .spotlight-title {
        font-size: 1.125rem;
    }
    
    /* Products Mobile */
    .products-header {
        padding: 2rem 0 1.5rem;
        text-align: center;
    }
    
    .products-header h1 {
        font-size: 2rem !important;
    }
    
    .products-header p {
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        padding: 1.5rem 0;
    }
    
    .product-card {
        width: 100%;
        margin: 0 auto;
    }
    
    .product-image {
        height: 250px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    /* Category Filter Mobile */
    .category-filter {
        gap: 0.5rem;
        margin: 1.5rem 0;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Trust Badges Mobile */
    .trust-badges {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .badge {
        text-align: center;
    }
    
    .badge-number {
        font-size: 2.5rem;
    }
    
    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 2rem 0 1.5rem !important;
    }
    
    .footer-bottom {
        padding: 1.5rem 0 !important;
        font-size: 0.8rem;
    }
    
    .footer-social {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    /* Forms Mobile */
    .checkout-grid,
    .account-layout,
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .order-summary,
    .account-sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    /* Search Bar Mobile */
    #searchBar {
        padding: 1rem 0;
        border-top: 1px solid var(--border);
    }
    
    #searchBar form {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    #searchBar input {
        width: 100%;
        font-size: 16px;
    }
    
    #searchBar button {
        width: 100%;
    }
    
    /* Cart Mobile */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cart-item-image {
        width: 100%;
        max-width: 150px;
        margin: 0 auto;
    }
    
    .cart-item-details {
        width: 100%;
        text-align: center;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: center;
    }
    
    /* Order Summary Mobile */
    #cart-summary {
        max-width: 100% !important;
        margin: 2rem 0 0 0 !important;
    }
    
    /* Tables Mobile */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }
    
    /* User Dropdown Mobile */
    .user-dropdown {
        right: 0;
        left: auto;
        transform: none;
        min-width: 200px;
        max-width: 280px;
    }
    
    /* Mobile Menu Improvements */
    .mobile-menu {
        top: 56px;
        padding: 1.5rem;
    }
    
    .mobile-menu nav a {
        padding: 1rem;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border);
    }
    
    /* Contact Form Mobile */
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-form h1 {
        font-size: 2rem !important;
    }
    
    /* Login/Register Forms Mobile */
    .auth-form {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .auth-form h1 {
        font-size: 2rem !important;
    }
    
    /* Account Page Mobile */
    .account-profile {
        text-align: center;
        padding: 1.5rem;
    }
    
    .account-nav-link {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Order Cards Mobile */
    .order-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .order-items {
        margin-top: 1rem;
    }
    
    /* Product Detail Mobile */
    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    
    .product-images {
        order: -1;
    }
    
    .product-detail-info {
        padding: 1rem 0;
    }
    
    .product-detail-title {
        font-size: 1.5rem !important;
    }
    
    .product-detail-price {
        font-size: 1.75rem !important;
    }
    
    /* Wishlist Mobile */
    .wishlist-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* Checkout Mobile */
    .checkout-form {
        padding: 1rem;
    }
    
    .checkout-summary {
        padding: 1rem;
        margin-top: 2rem;
    }
    
    /* Alert Messages Mobile */
    .alert {
        padding: 1rem;
        margin: 1rem 0;
        font-size: 0.9rem;
    }
    
    /* Buttons Mobile */
    .btn-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Image Gallery Mobile */
    .image-gallery {
        grid-template-columns: 1fr !important;
    }
    
    .image-gallery-main {
        order: -1;
    }
    
    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile (max-width: 479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Typography */
    .hero-title {
        font-size: 2rem !important;
    }
    
    .products-header h1 {
        font-size: 1.75rem !important;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    /* Header */
    .header-actions button,
    .header-actions a {
        width: 28px;
        height: 28px;
    }
    
    .header-actions svg {
        width: 16px;
        height: 16px;
    }
    
    .logo svg {
        width: 24px;
        height: 24px;
    }
    
    .logo-main {
        font-size: 12px;
    }
    
    .logo-sub {
        font-size: 8px;
    }
    
    /* Cards */
    .spotlight-card {
        padding: 1rem;
        min-height: 240px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1.125rem;
    }
    
    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    textarea,
    select {
        padding: 0.75rem;
        font-size: 16px;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        height: auto;
    }
    
    /* Trust badges */
    .badge-number {
        font-size: 2rem;
    }
    
    .badge-label {
        font-size: 0.8rem;
    }
    
    /* Footer */
    .footer-bottom {
        font-size: 0.75rem;
    }
    
    /* Mobile menu */
    .mobile-menu {
        padding: 1rem;
    }
    
    .mobile-menu nav a {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

/* Tablet Landscape (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--s6);
    }
    
    .hero-spotlights {
        grid-template-columns: 1fr 1fr;
    }
}

/* Desktop (1025px and above) */
@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop (1280px and above) */
@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .container {
        max-width: 1280px;
    }
}

/* Extra Large Desktop (1536px and above) */
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        padding: var(--s8) 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .header-actions,
    .btn,
    .wishlist-btn {
        display: none !important;
    }
    
    body {
        background: white;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image,
    .spotlight-image {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Override (Force Light) */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
    }
    
    body {
        background: var(--bg) !important;
        color: var(--text) !important;
    }
}

/* ============================================
   ADDITIONAL MOBILE IMPROVEMENTS
   ============================================ */

/* Touch-friendly tap targets */
@media (max-width: 767px) {
    a, button, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improve touch scrolling */
    .category-filter,
    .mobile-menu,
    .product-images-thumbnails {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent text size adjustment */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* Better spacing for mobile content */
    section {
        padding: 2rem 0;
    }
    
    /* Improve readability */
    p {
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    /* Better form labels */
    label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        font-size: 0.9rem;
    }
    
    /* Improve select dropdowns */
    select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        padding-right: 2.5rem;
    }
    
    /* Better spacing for lists */
    ul, ol {
        padding-left: 1.5rem;
        margin-bottom: 1rem;
    }
    
    li {
        margin-bottom: 0.5rem;
    }
    
    /* Improve image loading */
    img {
        display: block;
        max-width: 100%;
        height: auto;
    }
    
    /* Better video embeds */
    iframe,
    video {
        max-width: 100%;
        height: auto;
    }
    
    /* Improve table responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better modal/popup on mobile */
    .modal,
    .popup {
        width: 95%;
        max-width: 95%;
        margin: 1rem auto;
    }
    
    /* Improve notification/alert positioning */
    .notification,
    .toast {
        left: 1rem;
        right: 1rem;
        width: auto;
    }
    
    /* Better breadcrumb on mobile */
    .breadcrumb {
        font-size: 0.8rem;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Improve badge/tag spacing */
    .badge,
    .tag {
        margin: 0.25rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Better accordion/collapse */
    .accordion-header {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
    
    /* Improve card layouts */
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .card-header,
    .card-footer {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Better spacing for sections */
    .section-header {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        color: var(--text-light);
    }
    
    /* Improve empty states */
    .empty-state {
        padding: 3rem 1rem;
        text-align: center;
    }
    
    .empty-state svg {
        width: 64px;
        height: 64px;
        margin: 0 auto 1rem;
    }
    
    .empty-state h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    /* Better loading states */
    .loading {
        padding: 2rem;
        text-align: center;
    }
    
    /* Improve error messages */
    .error-message {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 8px;
        font-size: 0.9rem;
    }
    
    /* Better success messages */
    .success-message {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 8px;
        font-size: 0.9rem;
    }
}

/* ============================================
   FIX SPECIFIC PAGE LAYOUTS
   ============================================ */

/* Cart Page Mobile */
@media (max-width: 767px) {
    .cart-container {
        padding: 1rem 0;
    }
    
    .cart-container h1 {
        font-size: 2rem !important;
        margin-bottom: 1.5rem;
    }
    
    .cart-items {
        margin-bottom: 2rem;
    }
}

/* Checkout Page Mobile */
@media (max-width: 767px) {
    .checkout-container {
        padding: 1rem 0;
    }
    
    .checkout-container h1 {
        font-size: 2rem !important;
        margin-bottom: 1.5rem;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Account Page Mobile */
@media (max-width: 767px) {
    .account-container {
        padding: 1rem 0;
    }
    
    .account-container h1 {
        font-size: 2rem !important;
        margin-bottom: 1.5rem;
    }
    
    .account-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .account-tab {
        display: inline-block;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Product Detail Page Mobile */
@media (max-width: 767px) {
    .product-detail-container {
        padding: 1rem 0;
    }
    
    .product-detail-container h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem;
    }
    
    .product-gallery {
        margin-bottom: 2rem;
    }
    
    .product-thumbnails {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0;
    }
    
    .product-thumbnail {
        flex-shrink: 0;
        width: 60px;
        height: 60px;
    }
    
    .product-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 100;
    }
    
    .product-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Contact Page Mobile */
@media (max-width: 767px) {
    .contact-container {
        padding: 1rem 0;
    }
    
    .contact-container h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem;
    }
    
    .contact-info {
        margin-bottom: 2rem;
    }
    
    .contact-info-item {
        margin-bottom: 1rem;
        padding: 1rem;
        background: var(--bg-subtle);
        border-radius: 8px;
    }
}

/* About Page Mobile */
@media (max-width: 767px) {
    .about-container {
        padding: 1rem 0;
    }
    
    .about-container h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem;
    }
    
    .about-section {
        margin-bottom: 2rem;
    }
}

/* Blog/Content Pages Mobile */
@media (max-width: 767px) {
    .blog-container,
    .content-container {
        padding: 1rem 0;
    }
    
    .blog-post,
    .content-article {
        padding: 1rem;
    }
    
    .blog-post h1,
    .content-article h1 {
        font-size: 1.75rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .blog-post img,
    .content-article img {
        width: 100%;
        height: auto;
        margin: 1rem 0;
        border-radius: 8px;
    }
    
    .blog-meta,
    .content-meta {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
}


/* ============================================
   COMPREHENSIVE RESPONSIVE FIXES
   ============================================ */

/* Prevent horizontal scroll globally */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Container fixes */
.container {
    width: 100%;
    max-width: 1400px;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

/* Header responsive fixes */
.site-header {
    width: 100%;
    overflow-x: hidden;
}

.header-content {
    width: 100%;
    max-width: 100%;
}

/* Footer responsive fixes */
.site-footer {
    width: 100%;
    overflow-x: hidden;
}

.footer-grid {
    width: 100%;
}

/* Contact page responsive fixes */
.contact-grid {
    width: 100%;
}

/* Image responsive fixes */
img {
    max-width: 100%;
    height: auto;
}

/* Grid responsive fixes */
.products-grid,
.hero-grid,
.hero-spotlights {
    width: 100%;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Header */
    .header-content {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .header-actions {
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    /* Logo */
    .logo {
        flex-shrink: 0;
    }
    
    .logo svg {
        width: 28px;
        height: 28px;
    }
    
    .logo-main {
        font-size: 13px;
    }
    
    .logo-sub {
        font-size: 8px;
    }
    
    /* Footer grid - single column */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 2rem 0 1.5rem !important;
    }
    
    .footer-bottom {
        padding: 1.5rem 0 !important;
    }
    
    /* Contact page - single column */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        width: 100%;
        max-width: 100%;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        max-width: 100%;
    }
    
    /* Search bar */
    #searchBar {
        width: 100%;
        padding: 1rem 0;
    }
    
    #searchBar form {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #searchBar input {
        width: 100%;
    }
    
    #searchBar button {
        width: 100%;
    }
    
    /* Hero section */
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.1;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    /* Products */
    .products-header h1 {
        font-size: 2rem !important;
    }
    
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* Product cards */
    .product-card {
        width: 100%;
        max-width: 100%;
    }
    
    .product-image {
        height: 250px;
    }
    
    /* Spotlight cards */
    .spotlight-card {
        padding: 1.5rem;
        min-height: 300px;
    }
    
    .spotlight-number {
        font-size: 2rem;
    }
    
    .spotlight-title {
        font-size: 1.1rem;
    }
    
    /* Trust badges */
    .trust-badges {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .badge-number {
        font-size: 2rem;
    }
    
    /* Tables */
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
    }
    
    /* Mobile menu */
    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
    
    /* User dropdown */
    .user-dropdown {
        right: 0;
        left: auto;
        transform: none;
        min-width: 200px;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .products-header h1 {
        font-size: 1.75rem !important;
    }
    
    .spotlight-card {
        padding: 1rem;
        min-height: 250px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .header-actions button,
    .header-actions a {
        width: 28px;
        height: 28px;
    }
    
    .header-actions svg {
        width: 16px;
        height: 16px;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
    }
    
    .contact-grid {
        grid-template-columns: 1fr !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Ensure no element causes overflow */
* {
    max-width: 100%;
}

/* Fix for specific elements that might overflow */
pre, code {
    overflow-x: auto;
    max-width: 100%;
}

svg {
    max-width: 100%;
    height: auto;
}

/* ============================================
   SIMPLE MARGIN FIXES ONLY
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem !important;
    }
    
    /* Fix margins for content without container */
    main > div:not(.container),
    main > section:not(.hero-section):not(.site-footer) {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box;
    }
    
    /* Fix inline styles that cause margin issues */
    div[style*="max-width"],
    div[style*="margin: 0 auto"] {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .hero-section .container,
    .site-footer .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem !important;
    }
    
    main > div:not(.container),
    main > section:not(.hero-section):not(.site-footer) {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .header-content {
        padding: 0 0.75rem;
    }
}
/* ============================================
   FIX HEADER OVERFLOW AND DROPDOWN ISSUES
   ============================================ */

/* Fix header overflow so dropdowns can appear outside */
.site-header {
    overflow: visible !important;
}

.header-content {
    overflow: visible !important;
}

/* Ensure user dropdown appears outside header */
.user-menu-wrapper {
    position: relative;
}

.user-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    min-width: 220px !important;
}

/* Fix search bar positioning */
#searchBar {
    position: relative !important;
    z-index: 1000 !important;
}

@media (max-width: 768px) {
    /* On mobile, position dropdown fixed to viewport */
    .user-dropdown {
        position: fixed !important;
        top: 60px !important;
        right: 1rem !important;
        left: auto !important;
        max-width: calc(100vw - 2rem) !important;
        width: 280px !important;
    }
}
/* ============================================
   CLEAN ACCOUNT DROPDOWN STYLING
   ============================================ */

/* Enhanced user dropdown styling - Clean & Simple */
.user-dropdown {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    min-width: 240px !important;
    overflow: hidden !important;
    animation: dropdownFadeIn 0.15s ease-out !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    padding: 1rem 1.25rem !important;
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.user-dropdown-name {
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 0.25rem !important;
    color: #111827 !important;
}

.user-dropdown-email {
    font-size: 12px !important;
    color: #6b7280 !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

.user-dropdown-link {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem 1.25rem !important;
    color: #374151 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease !important;
    line-height: 1.2 !important;
    min-height: 40px !important;
}

.user-dropdown-link:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

.user-dropdown-link.logout {
    color: #dc2626 !important;
    border-top: 1px solid #e5e7eb !important;
}

.user-dropdown-link.logout:hover {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.user-dropdown-link svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    opacity: 1 !important;
    margin-right: 0 !important;
    vertical-align: middle !important;
    display: inline-block !important;
    stroke: currentColor !important;
}

.user-dropdown-link:hover svg {
    opacity: 1 !important;
    stroke: currentColor !important;
}

/* Remove the arrow - keep it simple */
.user-dropdown::before {
    display: none !important;
}

/* Search bar improvements - keep simple */
#searchBar {
    background: white !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 1rem !important;
}

#searchBar form {
    display: flex !important;
    gap: 0.75rem !important;
    align-items: center !important;
}

#searchBar input {
    flex: 1 !important;
    padding: 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: white !important;
    transition: border-color 0.15s ease !important;
}

#searchBar input:focus {
    outline: none !important;
    border-color: #374151 !important;
}

#searchBar button {
    padding: 0.75rem 1rem !important;
    background: #374151 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: background 0.15s ease !important;
}

#searchBar button:hover {
    background: #111827 !important;
}

@media (max-width: 768px) {
    #searchBar form {
        flex-direction: column !important;
    }
    
    #searchBar input,
    #searchBar button {
        width: 100% !important;
    }
    
    .user-dropdown {
        min-width: 220px !important;
        max-width: calc(100vw - 2rem) !important;
    }
}

/* Additional text alignment for user dropdown links */
.user-dropdown-link span,
.user-dropdown-link:not(:has(svg)) {
    display: flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
}

/* Ensure consistent icon and text alignment */
.user-dropdown-link > * {
    display: flex !important;
    align-items: center !important;
}