/* Reset and 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: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.25rem;
    font-weight: 700;
    color: #007bff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand a i {
    font-size: 1.2em; /* 1.2x the parent font-size, auto-adjusts with text */
}

.nav-brand a .brand-logo-image {
    height: 1.2em; /* 1.2x the parent font-size, auto-adjusts with text */
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    color: #333;
    font-size: 1.2rem;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.user-menu {
    position: relative;
}

.user-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.user-btn:hover {
    background: #f8f9fa;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    display: none;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.user-dropdown a:hover {
    background: #f8f9fa;
}

.user-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid #eee;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-cart {
    background: #28a745;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Categories Section */
.categories {
    padding: 4rem 0;
    background: white;
}

.categories h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #333;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.category-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    padding: 10px;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-content {
    padding: 1.5rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-content h3 {
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.category-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.btn-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
}

.btn-category:hover {
    background: #0056b3;
    gap: 0.75rem;
}

.btn-category i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.btn-category:hover i {
    transform: translateX(3px);
}

/* Featured Products */
.featured-products {
    padding: 4rem 0;
    background: #f8f9fa;
}

.featured-products .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.featured-products h2 {
    font-size: 2.5rem;
    color: #333;
    margin: 0;
}

.slider-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.availability-info {
    background: #fff3cd;
    color: #856404;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #ffeaa7;
}

.availability-info i {
    color: #ffc107;
}

.slider-controls {
    display: flex;
    gap: 0.5rem;
}

.slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.slider-btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

.slider-btn:active {
    transform: scale(0.95);
}

.product-slider-wrapper {
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
}

.product-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.product-slide {
    min-width: 25%;
    flex: 0 0 25%;
    padding: 0 0.75rem;
    box-sizing: border-box;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.slider-dot:hover {
    background: #007bff;
    transform: scale(1.2);
}

.slider-dot.active {
    background: #007bff;
    width: 30px;
    border-radius: 6px;
}

/* Responsive slider adjustments */
@media (max-width: 1024px) {
    .product-slide {
        min-width: 33.333%;
        flex: 0 0 33.333%;
    }
}

@media (max-width: 768px) {
    .product-slide {
        min-width: 50%;
        flex: 0 0 50%;
    }
}

@media (max-width: 480px) {
    .product-slide {
        min-width: 100%;
        flex: 0 0 100%;
        padding: 0 0.5rem;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 10px;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 1rem;
}

/* Footer */
.main-footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #007bff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #007bff;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #007bff;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 1rem;
    color: #333;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 3px;
    text-transform: uppercase;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}
/* 
Header Contact and Social Links */
.header-contact {
    display: flex;
    gap: 15px;
    margin-right: 20px;
    font-size: 0.9em;
    color: #666;
}

.header-contact span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-contact i {
    color: #007bff;
}

.header-social {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}

.header-social-links {
    display: flex;
    gap: 10px;
}

.header-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.header-social-links a:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

.nav-brand small {
    display: block;
    font-size: 0.7em;
    color: #666;
    margin-top: -5px;
    font-weight: normal;
}

.nav-brand img {
    height: 40px;
    margin-right: 10px;
}

/* Footer Links Styling */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .header-contact,
    .header-social {
        display: none;
    }
    
    .nav-brand a {
        font-size: 1.3rem;
    }
    
    .nav-brand img {
        height: 30px;
    }
}

/* Admin Layout Styles */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    margin-top: 0;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 80px;
    left: 10px;
    z-index: 999;
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.mobile-menu-toggle:hover {
    background: #0056b3;
}

.admin-sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    background: #1a252f;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: #007bff;
}

.nav-item.active .nav-link {
    background: rgba(0,123,255,0.2);
    border-left-color: #007bff;
    color: white;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 1rem;
}

.admin-content {
    flex: 1;
    background: #f8f9fa;
    padding: 2rem;
    overflow-x: hidden;
}

.admin-header {
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header p {
    color: #666;
    font-size: 1rem;
}

/* Category Form Section */
.category-form-section {
    margin-bottom: 2rem;
}

.category-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-col {
    display: flex;
    flex-direction: column;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Image Upload Section */
.image-upload-section {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.upload-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: rgba(0,123,255,0.1);
}

.tab-btn.active {
    background: white;
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

.tab-content {
    padding: 1rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 5px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #007bff;
    background: rgba(0,123,255,0.05);
}

.upload-placeholder i {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.upload-placeholder p {
    margin: 0.5rem 0;
    color: #333;
    font-weight: 500;
}

.upload-placeholder small {
    color: #666;
}

.image-preview {
    margin-top: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.preview-header span {
    font-weight: 500;
    color: #333;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-remove:hover {
    background: #c82333;
}

.image-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 1rem;
}

/* Categories List Section */
.categories-list-section {
    margin-top: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-form {
    margin-top: 1rem;
}

.search-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-controls .form-control {
    flex: 1;
    min-width: 200px;
}

.search-controls select {
    min-width: 150px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.category-item .category-image {
    height: 180px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-item .category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.category-header {
    padding: 1rem 1rem 0.5rem;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.category-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.category-description {
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.category-description p {
    margin: 0.5rem 0;
}

.category-meta {
    padding: 0.5rem 1rem;
    border-top: 1px solid #f0f0f0;
}

.text-muted {
    color: #999;
    font-size: 0.85rem;
}

.category-actions {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.category-actions form {
    flex: 1;
}

.category-actions .btn {
    width: 100%;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-content {
        padding: 1rem;
        margin-left: 0;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .search-controls {
        flex-direction: column;
    }
    
    .search-controls .form-control,
    .search-controls select {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-header h1 {
        font-size: 1.5rem;
    }
    
    .category-actions {
        flex-direction: column;
    }
    
    .upload-placeholder i {
        font-size: 2rem;
    }
}
