/* FashionGuy E-Commerce Website - Main Styles */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white: #ffffff;
    --black: #000000;
    --text-color: #333333;
    --text-light: #7f8c8d;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

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;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Top Bar ===== */
.top-bar {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left span,
.top-bar-right a {
    margin-right: 20px;
}

.top-bar-right a:hover {
    color: var(--accent-color);
}

.top-bar i {
    margin-right: 5px;
}

/* ===== Main Header ===== */
.main-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo a {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo img {
    height: 70px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* ===== Search Bar ===== */
.search-bar {
    flex: 1;
    max-width: 500px;
}

.search-form {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
}

.search-form button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px 25px;
    transition: var(--transition);
}

.search-form button:hover {
    background-color: #c0392b;
}

/* ===== Header Actions ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon, .wishlist-icon {
    position: relative;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-left: 20px;
    transition: var(--transition);
}

.cart-icon:hover, .wishlist-icon:hover {
    color: var(--secondary-color);
}

.cart-count, .wishlist-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    color: var(--secondary-color);
}

.mobile-menu-toggle.active i {
    color: var(--secondary-color);
}

/* ===== Navigation ===== */
.main-nav {
    background-color: var(--primary-color);
    box-shadow: var(--shadow);
    position: relative;
}

.nav-menu {
    display: flex;
    justify-content: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 25px;
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background-color: var(--secondary-color);
}

.nav-menu .admin-link {
    background-color: var(--warning-color);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li a:hover {
    background-color: var(--light-color);
    color: var(--secondary-color);
}

/* ===== Flash Messages ===== */
.flash-message {
    padding: 15px;
    margin-bottom: 0;
    border-radius: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.flash-message .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border-bottom: 3px solid #28a745;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border-bottom: 3px solid #dc3545;
}

.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    border-bottom: 3px solid #ffc107;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-bottom: 3px solid #17a2b8;
}

.flash-message button {
    font-size: 1.5rem;
    color: inherit;
    opacity: 0.7;
}

.flash-message button:hover {
    opacity: 1;
}

/* ===== Main Content ===== */
.main-content {
    min-height: calc(100vh - 400px);
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--light-color);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Section Styles ===== */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 125%; /* 4:5 aspect ratio */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-badge.featured {
    background-color: var(--warning-color);
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-title a {
    color: inherit;
}

.product-title a:hover {
    color: var(--secondary-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.stars {
    color: var(--warning-color);
}

.rating-count {
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.original-price {
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge {
    background-color: var(--success-color);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions-detail {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.product-actions-detail .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart {
    flex: 1;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
}

.btn-add-cart:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===== Categories Section ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.category-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.category-name {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Newsletter Section ===== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 60px 0;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.newsletter-content p {
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    outline: none;
}

.newsletter-form button {
    padding: 15px 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: #c0392b;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3,
.footer-column h4 {
    margin-bottom: 20px;
    color: var(--white);
}

.footer-logo {
    margin-bottom: 15px;
}

.footer-logo img {
    height: 55px;
}

.footer-column p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--light-color);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--light-color);
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-info i {
    margin-top: 3px;
    color: var(--secondary-color);
}

.payment-methods {
    margin-top: 20px;
}

.payment-methods h5 {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.payment-badge {
    display: inline-block;
    background-color: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom-content p {
    margin: 5px 0;
    color: var(--light-color);
    font-size: 0.9rem;
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* ===== Auth Forms ===== */
.auth-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.auth-card h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check input[type="checkbox"] {
    margin-right: 8px;
}

.form-check label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 0.9rem;
}

.forgot-link {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 14px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.auth-form button[type="submit"]:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-links p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-links a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ===== Responsive Design ===== */
/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .search-bar {
        max-width: 350px;
    }
}

/* Tablet Landscape Header Fix (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-content {
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        order: 1;
        flex: 0 0 auto;
    }
    
    .search-bar {
        order: 2;
        flex: 1;
        max-width: 400px;
        margin: 0 20px;
    }
    
    .header-actions {
        order: 3;
        flex: 0 0 auto;
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        order: 4;
        margin-left: 10px;
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
    /* Top Bar */
    .top-bar {
        font-size: 0.8rem;
        padding: 5px 0;
    }
    
    .top-bar-content {
        flex-direction: row;
        text-align: right;
        gap: 5px;
        justify-content: flex-end;
    }
    
    /* Hide welcome text on tablet/mobile */
    .top-bar-left {
        display: none !important;
    }
    
    /* Align login/register to right */
    .top-bar-right {
        margin-left: auto;
        width: 100%;
        text-align: right;
    }
    
    .top-bar-right a {
        margin-right: 0;
        margin-left: 15px;
        font-size: 0.85rem;
    }
    
    /* Header */
    .main-header {
        padding: 15px 0;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: space-between;
    }
    
    .logo {
        flex: 0 0 auto;
        order: 1;
    }
    
    .logo img {
        height: 60px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
    }
    
    .search-form input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .search-form button {
        padding: 10px 20px;
    }
    
    .header-actions {
        gap: 15px;
        margin-left: auto;
        order: 2;
        flex: 0 0 auto;
    }
    
    .header-actions a {
        font-size: 1.3rem;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
        font-size: 1.5rem;
        padding: 5px;
        order: 2;
    }    /* Navigation */
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        z-index: 999;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu > li > a {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    /* Dropdown for Mobile */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .dropdown-menu li a {
        padding: 10px 20px 10px 40px;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: var(--white) !important;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 40px 0;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .hero-content .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Products */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .product-title a {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-category {
        font-size: 0.8rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .btn-add-cart {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .btn-add-cart i {
        font-size: 0.9rem;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-card {
        padding: 20px;
    }
    
    .category-icon i {
        font-size: 2rem;
    }
    
    /* Section Titles */
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Newsletter */
    .newsletter-content h2 {
        font-size: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-form input {
        border-radius: 5px;
    }
    
    .newsletter-form button {
        border-radius: 5px;
        width: 100%;
    }
    
    /* Product Details Page */
    .product-details-container {
        flex-direction: column;
    }
    
    .product-images,
    .product-details {
        width: 100%;
    }
    
    /* Cart & Checkout */
    .cart-container {
        flex-direction: column;
    }
    
    .cart-items,
    .cart-summary {
        width: 100%;
    }
    
    .cart-table {
        font-size: 0.9rem;
    }
    
    /* Auth Pages */
    .auth-container {
        padding: 30px 0;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* User Profile */
    .profile-container {
        flex-direction: column;
    }
    
    .profile-sidebar,
    .profile-content {
        width: 100%;
    }
    
    /* Admin Sidebar */
    .admin-sidebar {
        width: 100%;
        position: static;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 15px;
    }
    
    /* Tables */
    table {
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 8px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* Top Bar - Show like tablet */
    .top-bar {
        font-size: 0.75rem;
        padding: 5px 0;
    }
    
    .top-bar-content {
        flex-direction: row;
        justify-content: flex-end;
    }
    
    .top-bar-left {
        display: none !important;
    }
    
    .top-bar-right {
        width: 100%;
        text-align: right;
    }
    
    .top-bar-right a {
        margin-left: 10px;
        font-size: 0.75rem;
    }
    
    /* Header */
    .header-content {
        gap: 10px;
    }
    
    .logo img {
        height: 50px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .header-actions a {
        font-size: 1.2rem;
    }
    
    .cart-count {
        font-size: 0.7rem;
        padding: 1px 4px;
        min-width: 16px;
    }
    
    /* Navigation */
    .nav-menu > li > a {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .hero-content .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
    
    /* Products */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        height: 250px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price .current-price {
        font-size: 1.2rem;
    }
    
    .btn-add-cart {
        width: 100%;
        justify-content: center;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-card {
        padding: 25px;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .category-icon {
        margin-bottom: 0;
    }
    
    .category-icon i {
        font-size: 2.5rem;
    }
    
    .category-name {
        font-size: 1.1rem;
        text-align: left;
    }
    
    /* Section Spacing */
    .section {
        padding: 30px 0;
    }
    
    .section-title {
        margin-bottom: 20px;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .section-title p {
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 30px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-column h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        font-size: 0.85rem;
    }
    
    /* Newsletter */
    .newsletter-section {
        padding: 30px 0;
    }
    
    .newsletter-content h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .newsletter-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .newsletter-form input {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .newsletter-form button {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* Cart Table - Make it scrollable */
    .cart-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .cart-table {
        min-width: 500px;
    }
    
    /* Product Details */
    .product-images {
        margin-bottom: 20px;
    }
    
    .product-details h1 {
        font-size: 1.5rem;
    }
    
    .product-details .price {
        font-size: 1.5rem;
    }
    
    /* Auth Forms */
    .auth-card {
        padding: 25px 15px;
    }
    
    .auth-card h2 {
        font-size: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    /* Alerts */
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* Notifications */
    .notification {
        right: -350px;
        min-width: 250px;
        max-width: calc(100vw - 20px);
        font-size: 0.85rem;
    }
    
    .notification.show {
        right: 10px;
    }
    
    /* Admin Sidebar */
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        position: relative;
        height: auto;
    }
    
    .admin-menu {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .admin-menu li {
        flex-shrink: 0;
    }
    
    .admin-menu a {
        padding: 12px 20px;
        white-space: nowrap;
    }
    
    /* Stats Cards */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    /* Filters */
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters select,
    .filters input {
        width: 100%;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    /* Breadcrumbs */
    .breadcrumbs {
        font-size: 0.85rem;
        padding: 8px 0;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .logo-text {
        font-size: 1.1rem;
    }
    
    .hero-content h1 {
        font-size: 1.4rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 20px 0;
        min-height: auto;
    }
    
    .nav-menu {
        max-height: 60vh;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch */
    .nav-menu > li > a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .btn {
        min-height: 44px;
    }
    
    .header-actions a {
        padding: 8px;
    }
    
    /* Remove hover effects on touch devices */
    .product-card:hover {
        transform: none;
    }
    
    .category-card:hover {
        transform: none;
    }
}


/* ===== Notification System ===== */
.notification {
    position: fixed;
    top: 80px;
    right: -400px;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: right 0.3s ease;
    font-size: 0.95rem;
}

.notification.show {
    right: 20px;
}

.notification-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notification-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.notification button {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    margin-left: 15px;
}

.notification button:hover {
    opacity: 1;
}
