/* Main Styles for Fonatech Store */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #A5D6A7;
    --secondary-color: #FF9800;
    --dark: #333;
    --light: #f8f9fa;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background-color: #fff;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

/* Cart Styles */
.cart-item {
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: var(--light);
}

/* Checkout Styles */
.checkout-step {
    position: relative;
    padding-left: 40px;
}

.checkout-step:before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
}

.checkout-step:last-child:before {
    display: none;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 1;
}

/* Order Tracking Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--light);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-icon.completed {
    background: var(--primary-color);
    color: white;
}

.timeline-line {
    position: absolute;
    left: 14px;
    top: 30px;
    bottom: -30px;
    width: 2px;
    background: var(--primary-light);
}

.timeline-item:last-child .timeline-line {
    display: none;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-img {
        height: 150px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .checkout-step {
        padding-left: 30px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Toast Customization */
.toast {
    backdrop-filter: blur(10px);
    border-radius: 8px;
}

/* Product Gallery */
.product-gallery .main-image img {
    width: 100%;
    border-radius: 8px;
}

.thumbnail-img {
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.thumbnail-img:hover {
    opacity: 0.8;
}

/* Quantity Selector */
.quantity-selector {
    display: inline-flex;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.quantity-btn {
    padding: 8px 12px;
    background: var(--light);
    border: none;
    cursor: pointer;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

/* Admin Dashboard */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray);
    font-size: 14px;
}

/* Sidebar Navigation */
.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 10px;
}

.sidebar-nav li a {
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--dark);
    transition: all 0.3s ease;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-nav li a i {
    width: 25px;
    margin-right: 10px;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .table-responsive table {
        min-width: 600px;
    }
}

/* Price Styling */
.price {
    font-weight: bold;
    color: var(--primary-color);
}

.old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.9em;
    margin-left: 10px;
}

/* Badge Styling */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
}

/* Form Styling */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* Footer */
footer {
    background: #1a1a1a;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Newsletter */
.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}



/* Responsive Styles */
@media (max-width: 768px) {
    /* Container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Product cards */
    .product-card .card-img-top {
        height: 180px;
    }
    
    /* Cart table */
    .table-responsive-cart {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Checkout */
    .checkout-summary {
        margin-top: 20px;
    }
    
    /* Order timeline */
    .timeline-content h6 {
        font-size: 14px;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    /* Forms */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on mobile */
    }
    
    /* Dashboard sidebar */
    .sidebar-mobile {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    /* Product grid - 2 columns */
    .product-grid .col-md-4 {
        width: 50%;
    }
    
    /* Cart actions */
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Price display */
    .price {
        font-size: 14px;
    }
    
    /* Order summary */
    .order-summary {
        font-size: 14px;
    }
    
    /* Timeline text */
    .timeline-content small {
        font-size: 10px;
    }
}

/* Touch-friendly buttons */
@media (hover: none) and (pointer: coarse) {
    button, 
    .btn,
    .nav-link,
    .product-card {
        cursor: pointer;
        min-height: 44px;
    }
    
    input, 
    select, 
    textarea {
        font-size: 16px;
    }
}

/* Landscape mode */
@media (max-width: 900px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 40px 0;
    }
}

/* Print styles */
@media print {
    .no-print,
    .sidebar,
    .menu-toggle,
    .btn,
    nav.navbar,
    footer,
    .cart-actions {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}