/* Modern CSS for Maryam HandiCraft */

:root {
    --primary-color: #2C4C3B;      /* Deep Forest Green */
    --secondary-color: #C86B52;    /* Terracotta */
    --accent-color: #D4A373;       /* Warm Sand */
    --success-color: #6B8F71;
    --warning-color: #E07A5F;
    --light-bg: #FFFCF8;           /* Cream */
    --dark-bg: #24372D;
    --text-dark: #2D2D2D;
    --text-light: #6B6B6B;
    --border-color: #E8E2D9;
    --shadow: 0 8px 30px rgba(44, 76, 59, 0.08);
    --shadow-lg: 0 15px 40px rgba(44, 76, 59, 0.12);
    --glass-bg: rgba(255, 252, 248, 0.85);
    --glass-border: 1px solid rgba(200, 107, 82, 0.15);
    --border-radius: 12px;
    --transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Modern Header */
.modern-header {
    background: #EAE0D5; /* Earthy beige instead of white/cream */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(44, 76, 59, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.header-top a:not(.btn) {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.header-top a:not(.btn):hover {
    color: var(--accent-color);
}

.header-top .btn {
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    padding: 5px 15px;
}

.header-main {
    padding: 15px 0;
}

.navbar-brand img {
    max-height: 50px;
    border-radius: 4px;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 10px 20px !important;
    transition: var(--transition);
    border-radius: var(--border-radius);
    margin: 0 5px;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after {
    width: 70%;
}

/* Modern Cards */
.modern-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: none;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.modern-card:hover .card-img-top {
    transform: scale(1.05) translateZ(20px);
}

.modern-card .card-body {
    transform: translateZ(30px);
    transition: var(--transition);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1) translateZ(20px);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
    transform: translateZ(40px);
    transition: var(--transition);
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.4;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.stars {
    color: #ffc107;
    margin-right: 8px;
}

.rating-text {
    font-size: 14px;
    color: var(--text-light);
}

/* Modern Buttons */
.btn-modern {
    background: var(--secondary-color);
    border: 2px solid transparent;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.15s ease-in-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 6px 0 0 #a0533f, 0 10px 20px rgba(0,0,0,0.1);
}

.btn-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: -1;
}

.btn-modern:hover::after {
    left: 0;
}

.btn-modern:hover {
    color: white;
    box-shadow: 0 4px 0 0 #1b3025, 0 8px 15px rgba(0,0,0,0.1);
    transform: translateY(2px);
}

.btn-modern:active {
    box-shadow: 0 0 0 0 transparent, inset 0 3px 5px rgba(0,0,0,0.2);
    transform: translateY(6px);
}

/* Floating Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

.btn-outline-modern {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
    padding: 10px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-modern:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    animation: pulse 15s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image img {
    transition: var(--transition);
    border: 3px solid rgba(255,255,255,0.2);
}

.hero-image img:hover {
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.category-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    min-width: 250px;
    max-width: 300px;
    flex: 1;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.category-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

/* Products Section */
.products-section {
    padding: 80px 0;
}

/* Footer */
.modern-footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h5 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 30px;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .modern-header .navbar-nav {
        text-align: center;
        margin-top: 20px;
    }
    
    .modern-header .navbar-nav .nav-link {
        padding: 15px 20px !important;
        margin: 5px 0;
    }
    
    .header-top {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .modern-card {
        margin-bottom: 20px;
    }
    
    .btn-modern {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .navbar-brand img {
        max-height: 40px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .product-price {
        font-size: 18px;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
}

/* Loading spinner container */
#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

#loading-spinner.hidden {
    display: none !important;
    opacity: 0;
}

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

/* Button Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

/* Improved Focus States */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

/* Better Hover Effects */
.product-card:hover .product-overlay {
    opacity: 1;
    transform: scale(1);
}

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

/* Improved Cart Item Styling */
.cart-item {
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Alert Messages */
.alert-modern {
    border: none;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.alert-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

/* Cart Badge */
.cart-badge {
    position: relative;
    display: inline-block;
}

.cart-badge .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Form Styles */
.form-modern {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-control-modern {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 15px;
    font-size: 16px;
    transition: var(--transition);
}

.form-control-modern:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Dashboard Styles */
.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.fade-in.active {
    opacity: 1;
}

/* Delay classes for staggered animations */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }




