/* Fashion Store - Frontend Styles (IKEA-inspired) */

:root {
    --primary-color: #0058a3;
    --secondary-color: #ffd500;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f9f9f9;
    --dark-color: #1d1d1d;
    --text-color: #3d3d3d;
    --border-color: #e8e8e8;
    --hover-color: #f5f5f5;
    --font-family: 'Noto Sans Thai', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --border-radius: 4px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Global Styles */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

/* Carousel Styles */

/* Bootstrap Override */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #004080;
    border-color: #004080;
    transform: translateY(-1px);
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-bottom: 1px solid #e9ecef;
    padding: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.page-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.4;
}

.page-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

/* Navigation */

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 500;
}

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

/* Navigation */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
}

.navbar-brand {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
    font-weight: 600;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 60vh;
    background: linear-gradient(135deg, var(--primary-color), #004080);
    color: white;
}

.hero-slide {
    min-height: 60vh;
    background: transparent;
}

.hero-slide-2 {
    background: linear-gradient(135deg, #004080, var(--primary-color));
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: white;
    border-radius: var(--border-radius);
    height: 100%;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: #0058a3;
    box-shadow: 0 8px 25px rgba(0, 88, 163, 0.15);
}

.category-icon {
    width: 80px !important;
    height: 80px !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1rem !important;
    box-shadow: 0 4px 15px rgba(0, 88, 163, 0.2) !important;
}

.category-icon i {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Page Actions Styles */
.page-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.page-actions .btn i {
    font-size: 0.875rem;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

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

.product-image {
    height: 250px;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.product-actions .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.product-original-price {
    color: #6c757d;
    text-decoration: line-through;
    font-size: 1rem;
}

.rating {
    color: var(--secondary-color);
}

/* Cart Badge */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.75rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
footer {
    margin-top: auto;
}

.social-links a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: var(--secondary-color) !important;
}

/* Search Modal */
.modal-content {
    border-radius: var(--border-radius);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner */
.loading-spinner {
    display: none;
    width: 2rem;
    height: 2rem;
    border: 0.25rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

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

/* Custom form controls */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 88, 163, 0.25);
}

/* User menu styles */
#user-menu .dropdown-menu {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

#user-menu .dropdown-item {
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease;
}

#user-menu .dropdown-item:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
}

/* Responsive navigation adjustments */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .navbar-nav .dropdown-item {
        color: var(--text-color);
    }
    
    .navbar-nav .dropdown-item:hover {
        background-color: var(--primary-color);
        color: white;
    }
}
