/*
============================================
Main Stylesheet for aaoW E-commerce
v2.0 - Corrected and Polished
============================================
*/

/* 
   Suggestion: For a more custom look, consider using a web font.
   You can uncomment the line below and add the font-family to the body.
   @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');
*/

:root {
    --deep-blue: #0a192f;
    --white: #ffffff;
    --black: #000000;
}

/* --- 1. Global Resets & Defaults --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* font-family: 'Poppins', sans-serif; */ /* <-- Example of using an imported font */
    background-color: #f8f9fa;
    color: #212529;
}

/* --- 2. Layout & Global Components --- */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-primary {
    background-color: var(--deep-blue);
    border-color: var(--deep-blue);
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

/* ENHANCED: Added :focus for keyboard accessibility */
.btn-primary:hover,
.btn-primary:focus {
    background-color: #1a3a6e; /* A slightly lighter shade */
    border-color: #1a3a6e;
    box-shadow: 0 0 0 0.25rem rgba(10, 25, 47, 0.5); /* Focus ring */
}

/* Prevents content from being hidden by the bottom nav on mobile */
@media (max-width: 991.98px) {
    body {
        /* Adds space at the bottom equal to the nav's height + a little extra */
        padding-bottom: 75px; 
    }
}

/* --- 3. Mobile Bottom Navigation --- */
.mobile-bottom-nav {
    height: 65px;
    background-color: var(--white);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -3px 6px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mobile-bottom-nav .nav-item span {
    font-size: 0.8rem;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item.active {
    color: var(--deep-blue);
}

/* --- 4. Product Card Styling --- */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: var(--white);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.product-card img {
    aspect-ratio: 1 / 1;
    object-fit: cover; /* This is the best practice for uniform image sizes */
}

/* --- 5. Page-Specific Styles --- */

/* --- Cart Page --- */
.cart-item .product-title {
    font-size: 1.1rem;
    font-weight: 500;
}

.quantity-selector {
    max-width: 130px;
}

.quantity-selector .form-control {
    background-color: #fff; /* Ensures input is not transparent */
    text-align: center;
}

.summary-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Makes the summary card stick to the top on desktop scrolls */
@media (min-width: 992px) {
    .summary-card.sticky-top {
        top: 80px; /* Adjust based on your top navbar height */
    }
}

/* --- Authentication Pages (Login & Signup) --- */
.auth-error-card {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: .25rem;
    text-align: left;
    display: none; /* Controlled by JavaScript */
}

/* Modern divider using pseudo-elements */
.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #6c757d;
    margin: 20px 0;
}
.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ccc;
}
.or-divider:not(:empty)::before {
    margin-right: .5em;
}
.or-divider:not(:empty)::after {
    margin-left: .5em;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
    user-select: none; /* ADDED: Prevents icon from being highlighted as text on click */
}

/* FIXED: Removed invalid stray hyphen from the end of the file */