/* --- 1. UTILITIES --- */
:root {
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --hover-transform: translateY(-5px);
}

[data-theme="dark"] {
    --glass-bg: rgba(30, 30, 30, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- 2. NAVBAR COMPONENTS --- */
.navbar-custom {
    background: var(--bg-primary); /* Uses your theme.css vars */
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
    transition: all 0.3s ease;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.btn-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: var(--text-primary);
    transition: all 0.2s;
}

.btn-theme-toggle:hover {
    background: var(--bg-secondary);
    transform: rotate(15deg);
}

.btn-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transition: all 0.2s;
}

.btn-icon-circle:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

/* --- 3. HOME HERO SECTION --- */
.hero-wrapper {
    position: relative;
    padding: 100px 0 140px; /* Extra bottom padding for overlap */
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d); /* Deep Professional Gradient */
    /* Alternative if you prefer Green: background: linear-gradient(135deg, #134E5E, #71B280); */
    color: white;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    font-weight: 300;
}

/* --- 4. CAROUSEL --- */
.carousel-floating-container {
    margin-top: -100px; /* Pulls carousel up into Hero */
    margin-bottom: 60px;
    padding: 0 15px;
}

.custom-carousel {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 4px solid var(--bg-card);
}

.carousel-item {
    height: 450px;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); /* Darken for text readability */
}

.carousel-caption h3 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* --- 5. INFO CARDS --- */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    transition: var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.info-card:hover::before {
    opacity: 1;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--bg-tertiary);
    color: var(--primary-dark);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.info-card:hover .icon-box {
    background: var(--primary-color);
    color: #000;
}

/* --- 6. FOOTER --- */
.footer-modern {
    background-color: #1e293b; /* Slate 800 */
    color: #94a3b8; /* Slate 400 */
    padding-top: 4rem;
    border-top: 5px solid var(--primary-color);
}

.footer-heading {
    color: #f8fafc; /* Slate 50 */
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-link {
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.75rem;
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #0f172a; /* Slate 900 */
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.85rem;
}

/* --- 7. BREADCRUMBS & FILTERS --- */
.breadcrumb-wrapper {
    background: var(--bg-secondary);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-item a { color: var(--primary-dark); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-secondary); }

.filter-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.search-input {
    border-radius: 50px;
    padding-left: 1.2rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

/* --- 8. PROJECT CARDS (Enhanced) --- */
.project-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-overlay { opacity: 1; }

/* --- 9. PRODUCT CARDS (Store) --- */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: 0.3s;
    background: var(--bg-card);
    position: relative;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.stock-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.price-tag {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary-dark);
}

/* --- 10. EVENTS TIMELINE --- */
.timeline {
    position: relative;
    padding: 2rem 0;
}

/* The vertical line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 24px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 16px; top: 0;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-primary); /* Creates a 'gap' effect */
    box-shadow: 0 0 0 2px var(--primary-color);
    z-index: 1;
}

.date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    flex-shrink: 0;
}

.date-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.date-day {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.status-open { background: #d1fae5; color: #065f46; } /* Green */
.status-filling { background: #ffedd5; color: #9a3412; } /* Orange */
.status-sold { background: #fee2e2; color: #991b1b; } /* Red */
.status-closed { background: #f3f4f6; color: #4b5563; } /* Grey */

/* --- 11. PAGINATION --- */
.pagination .page-link {
    color: var(--text-primary);
    border: none;
    margin: 0 5px;
    border-radius: 8px;
    transition: 0.2s;
}
.pagination .page-link:hover, .pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
}

/* --- 12. AUTHENTICATION PAGES (Login/Register) --- */
.auth-container {
    min-height: 100vh; /* Full screen height */
    overflow: hidden;
    background: var(--bg-primary);
}

.auth-image-side {
    background: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?q=80&w=2070&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    position: relative;
    min-height: 100vh;
}

.auth-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(26, 42, 108, 0.8), rgba(178, 31, 31, 0.8)); /* Brand Gradient Overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: white;
}

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-primary);
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    border-radius: 16px;
    /* Optional: Subtle shadow for depth */
    /* box-shadow: var(--shadow-xl); */ 
}

/* Custom Floating Inputs */
.form-floating > .form-control {
    border: 2px solid var(--border-light);
    border-radius: 10px;
    background-color: var(--bg-secondary);
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.15); /* Green Glow */
}

.btn-auth {
    padding: 12px;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.5px;
    transition: transform 0.2s;
}

.btn-auth:hover {
    transform: translateY(-2px);
}

/* Social Login Divider */
.divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    margin: 1.5rem 0;
}

.divider-text::before, .divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider-text span {
    padding: 0 10px;
    font-size: 0.85rem;
}

/* Animation for Content */
.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 13. SHOPPING CART --- */
.cart-container {
    background: var(--bg-primary);
}

.cart-item-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.2s;
    overflow: hidden;
}

.cart-item-row:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.cart-img-box {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.cart-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    background: var(--bg-secondary);
    border: none;
    padding: 5px 12px;
    color: var(--text-primary);
    transition: 0.2s;
}

.qty-btn:hover {
    background: var(--primary-light);
}

.qty-display {
    padding: 0 10px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    background: var(--bg-primary);
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    position: sticky;
    top: 100px; /* Sticks when scrolling */
}