/*
   =======================================================================
   1. Bootstrap Overrides and Custom Variables
   =======================================================================
*/

/* Custom primary color for Bootstrap to match your light blue */
:root {
    --bs-primary: #45ade6; /* Your light blue */
    --bs-primary-rgb: 69, 173, 230;
    --bs-blue-dark: #388ac4; /* Slightly darker on hover */
    --bs-dark-rgb: 0, 0, 0; /* Bootstrap dark for custom components */
    --bs-light-rgb: 248, 249, 250; /* Bootstrap light for custom components */
    --bs-gray-100: #f8f9fa; /* Lighter grey, good for subtle section backgrounds */
    --bs-gray-200: #e9ecef; /* Slightly darker grey */
    --bs-text-color: #333; /* Consistent dark text */
    --bs-secondary-text: #6c757d; /* Muted secondary text */
    --bs-success: #28a745; /* Bootstrap success green for consistency */
    --bs-warning: #ffc107; /* Bootstrap warning yellow */
    --bs-danger: #dc3545; /* Bootstrap danger red */
    --bs-info: #17a2b8; /* Bootstrap info blue */
}

body {
    /* Example: Use a modern font, ensure it's imported in base.html (e.g., via Google Fonts) */
    /* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); */
    font-family: 'Inter', sans-serif;
    color: var(--bs-text-color);
    background-color: var(--bs-gray-100); /* Overall light background for whitespace feel */
}

/* Global Section Padding/Margin for Visual Appeal & Whitespace */
/* Use Bootstrap's utility classes (py-5, my-5) in HTML directly for consistency */
/* Example: <section class="py-5 my-5"> */

.section-bg-light { /* Custom class for alternating backgrounds if not using odd/even logic */
    background-color: var(--bs-white);
}
.section-bg-grey {
    background-color: var(--bs-gray-100);
}


/* Custom Button Styling - Overriding Bootstrap's .btn-primary and .btn-outline-primary */
.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
    padding: 10px 20px; /* Slightly larger padding */
    border-radius: 8px; /* Slightly more rounded */
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.2); /* More prominent shadow */
    font-size: 1rem; /* Slightly larger font */
    font-weight: 600; /* Bolder text */
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--bs-blue-dark) !important;
    border-color: var(--bs-blue-dark) !important;
    transform: translateY(-2px) scale(1.02); /* Slight lift and scale */
    box-shadow: 0 6px 16px rgba(var(--bs-primary-rgb), 0.3);
}

.btn-outline-primary {
    background-color: transparent !important;
    border: 2px solid var(--bs-primary) !important; /* Slightly thicker border */
    color: var(--bs-primary) !important;
    box-shadow: none !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.2) !important;
}

/* Custom buttons for banners if needed (keeping existing) */
.btn-dark-custom {
    color: #fff;
    background-color: #000;
    border-color: #000;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    border-radius: 8px; /* Match other buttons */
    font-weight: 600;
}
.btn-dark-custom:hover {
    background-color: rgba(0,0,0,0.8);
    border-color: rgba(0,0,0,0.8);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.btn-outline-dark-custom {
    color: #000;
    border-color: #000;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    border-radius: 8px; /* Match other buttons */
    font-weight: 600;
}
.btn-outline-dark-custom:hover {
    background-color: #000;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}
.btn-light-custom {
    color: var(--bs-text-color);
    background-color: #fff;
    border-color: #fff;
    border-radius: 8px; /* Match other buttons */
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-light-custom:hover {
    background-color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/*
   =======================================================================
   2. Navigation Header Specific Styles
   =======================================================================
*/
header {
    position: sticky; /* Sticky Navbar Effect */
    top: 0;
    z-index: 1050; /* Ensure it's above other content */
    background-color: var(--bs-white); /* Explicit background for sticky effect */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Subtle shadow for lift */
    transition: all 0.3s ease; /* Smooth transition */
}
/* Adjust header shadow on scroll (requires JS to add a class like 'scrolled') */
/* Example:
.header.scrolled {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
*/

/* Logo Styling */
.navbar-brand {
    align-items: center;
    color: var(--bs-text-color);
}
.navbar-brand .logo-image {
    height: 40px; /* Slightly larger logo */
    margin-right: 12px;
}
.navbar-brand .logo-text {
    font-size: 26px; /* Slightly larger text */
    font-weight: bold;
    color: var(--bs-text-color);
}
.navbar-brand .logo-text b {
    font-size: 32px; /* Emphasize 'C' more */
    color: var(--bs-primary);
    line-height: 1; /* Adjust line-height to better align with the rest of the text */
    margin-right: 2px; /* Small gap between 'C' and 'atedge' */
}


/* Cart icon badge */
.header-icons-noti {
    background-color: #ff4d4f;
    color: white;
    border-radius: 50%;
    padding: 2px 6px; /* Slightly smaller for subtle look */
    font-size: 10px;
    position: absolute;
    top: -5px; /* Adjust position */
    right: -5px; /* Adjust position */
    line-height: 1.2;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Desktop Navigation Link Hover Effect */
.navbar-nav .nav-item .nav-link {
    font-weight: 600; /* Bolder nav links */
    color: var(--bs-text-color);
    padding: 15px 0; /* More vertical padding */
    margin: 0 15px; /* Horizontal spacing */
    position: relative;
    transition: color 0.3s ease;
}
.navbar-nav .nav-item .nav-link::after {
    content: '';
    position: absolute;
    left: 50%; /* Start from center */
    bottom: 5px; /* Position under the link */
    width: 0;
    height: 3px; /* Thicker underline */
    background-color: var(--bs-primary);
    transition: width 0.3s ease, left 0.3s ease; /* Animate width and position */
    border-radius: 2px;
}
.navbar-nav .nav-item .nav-link:hover,
.navbar-nav .nav-item .nav-link.active {
    color: var(--bs-primary);
}
.navbar-nav .nav-item .nav-link:hover::after,
.navbar-nav .nav-item .nav-link.active::after {
    width: 100%;
    left: 0; /* Expand to full width from left */
}

/* Search Bar Input Styling */
.form-control.search-input {
    border: 1px solid var(--bs-gray-200); /* Lighter border */
    border-radius: 50px !important; /* Fully rounded */
    padding: 10px 20px; /* More padding */
    width: 300px; /* Slightly wider */
    font-size: 0.95rem;
    background-color: #fcfcfc;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* Subtle inner shadow */
}
.form-control.search-input::placeholder {
    color: var(--bs-secondary-text);
}
.form-control.search-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
    background-color: #fff;
}
/* Search button in input-group */
.input-group .btn.search-button {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 50px !important; /* Match search input rounding */
    border-bottom-right-radius: 50px !important;
    padding: 10px 15px;
    font-size: 0.95rem;
    margin-left: -2px; /* Ensure seamless connection */
}

/* Live Search Suggestions (Search UX) */
.dropdown-menu#searchResults {
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--bs-gray-200);
    animation: fadeIn 0.3s ease-out; /* Animate dropdown appearing */
    max-height: 300px; /* Limit height */
    overflow-y: auto; /* Scroll if many results */
}
.dropdown-menu#searchResults.d-none {
    animation: fadeOut 0.3s ease-out forwards; /* Animate dropdown disappearing */
}
.dropdown-menu#searchResults .dropdown-item {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}
.dropdown-menu#searchResults .dropdown-item:hover {
    background-color: var(--bs-gray-100);
}
.dropdown-menu#searchResults .dropdown-item .item-price {
    font-weight: 600;
    color: var(--bs-primary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* User Welcome Message (desktop dropdown toggle) */
.dropdown .nav-link.dropdown-toggle {
    color: var(--bs-text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}
.dropdown .nav-link.dropdown-toggle:hover {
    color: var(--bs-primary);
}
.dropdown-menu {
    border-radius: 8px; /* Rounded corners for dropdown */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Subtle shadow */
    border: 1px solid var(--bs-gray-200);
}
.dropdown-item {
    transition: background-color 0.2s ease, color 0.2s ease;
}
.dropdown-item:hover {
    background-color: var(--bs-primary);
    color: white;
}


/*
   =======================================================================
   3. Offcanvas (Mobile Menu) Specific Styles
   =======================================================================
*/

.offcanvas-header {
    background-color: var(--bs-primary) !important;
    color: white !important;
}
.offcanvas-body .navbar-nav .nav-item .nav-link {
    font-weight: 500;
    border-bottom: 1px solid var(--bs-gray-100); /* Lighter divider */
    color: var(--bs-text-color);
}
.offcanvas-body .navbar-nav .nav-item .nav-link:hover {
    background-color: var(--bs-gray-100);
    color: var(--bs-primary);
}
.offcanvas-body .welcome-message {
    color: var(--bs-text-color);
    font-weight: 600;
    border-bottom: 1px solid var(--bs-gray-100);
}
.offcanvas-body .user-auth-section .btn {
    border-radius: 8px; /* Match global button style */
}
.offcanvas-body .topbar-social-mobile .fab {
    font-size: 1.3rem; /* Slightly larger icons */
    color: var(--bs-secondary-text);
}
.offcanvas-body .topbar-social-mobile .fab:hover {
    color: var(--bs-primary);
}


 /*  =======================================================================
   4. Hero Section, Product Cards, Banners, Shipping (Page Specific)
   =======================================================================
*/

/* Hero Section / Slide1 Styles (Already provided, including glassmorphism) */
.wrap-slick1 .item-slick1 {
    min-height: 650px;
    background-position: center;
    background-size: cover;
    position: relative;
    overflow: hidden;
}
.wrap-slick1 .item-slick1::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1;
}
.wrap-slick1 .item-slick1 .hero-content-wrapper {
    position: relative;
    z-index: 2;
    padding: 3rem;
    max-width: 900px;
    margin: auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.08); /* Glassmorphism background */
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.wrap-slick1 .item-slick1 .hero-content-wrapper:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3);
}
.wrap-slick1 .item-slick1 .display-3 {
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    margin-bottom: 1.5rem !important;
}
.wrap-slick1 .item-slick1 .lead {
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
}

/* Product Cards (already provided with hover effects, shadows, zoom) */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}
.card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    height: 280px; /* Consistent height for product images in grid */
    object-fit: cover;
    transition: transform 0.4s ease-in-out;
}
.card:hover .card-img-top {
    transform: scale(1.08);
}

/* Product Card Labels (New, Sale, Promotion) */
.block2-labelnew::before,
.block2-labelsale::before,
.block2-labelpromotion::before {
    z-index: 10;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 55px;
    height: 24px;
    border-radius: 12px;
    position: absolute;
    top: 15px;
    left: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.block2-labelsale::before {
  background-color: var(--bs-danger);
  content: 'Sale';
}
.block2-labelnew::before {
  background-color: var(--bs-primary);
  content: 'New';
}
.block2-labelpromotion::before {
  background-color: var(--bs-dark);
  content: 'Promo';
}

/* Product Card Overlay (Quick View Button Container) */
.block2-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); /* Semi-transparent dark overlay */
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allows clicks to pass through by default */
    border-radius: 12px; /* Match card rounding */
}
.card:hover .block2-overlay {
    opacity: 1; /* Show overlay on hover */
    pointer-events: auto; /* Re-enable pointer events for buttons inside */
}
.block2-overlay .btn {
    pointer-events: auto; /* Ensure buttons are clickable */
    margin: 5px; /* Space between buttons */
    opacity: 0; /* Initially hidden */
    transform: translateY(20px); /* Start slightly lower */
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0.1s; /* Stagger animation slightly */
}
.card:hover .block2-overlay .btn {
    opacity: 1; /* Fade in on hover */
    transform: translateY(0); /* Move to original position */
}


/* Top Picks & Banners (e.g., in index.html) */
.banner-card {
    border: none;
    border-radius: 15px; /* More rounded corners for banners */
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.banner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.banner-card .img-fluid {
    transition: transform 0.4s ease-in-out;
}
.banner-card:hover .img-fluid {
    transform: scale(1.05); /* Subtle zoom on image */
}
.banner-card .overlay-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%); /* Gradient overlay */
    color: white;
    transition: background 0.3s ease;
}
.banner-card:hover .overlay-content {
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%); /* Darker gradient on hover */
}
.banner-card .overlay-content h4 {
    font-size: clamp(1.5rem, 3vw, 2.5rem); /* Responsive font size for banner title */
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    margin-bottom: 1rem;
}
.banner-card .overlay-content .btn {
    opacity: 0; /* Initially hidden */
    transform: translateY(15px); /* Start slightly lower */
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0.1s;
}
.banner-card:hover .overlay-content .btn {
    opacity: 1; /* Fade in on hover */
    transform: translateY(0);
}


/* Product Quick View Modal (New styles for visual appeal) */
#productQuickViewModal .modal-content {
    border-radius: 20px;
    box-shadow: 0 20px 30px rgba(0,0,0,0.2);
}
#productQuickViewModal .modal-header {
    border-bottom: none;
    padding: 2.5rem;
}
#productQuickViewModal .modal-body {
    padding: 2.5rem;
}
#quickViewImage {
    max-height: 350px; /* Adjust image height in modal */
    width: 200%;
    object-fit: cover;
}
#quickViewTitle {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}
#quickViewPrice {
    font-size: 1.5rem;
}
#quickViewDescription {
    color: var(--bs-secondary-text);
}
#quickViewQuantity {
    max-width: 90px; /* Keep quantity input compact */



/* Category Link Styling (from shop.html) */
.category-link {
    color: var(--bs-text-color);
    text-decoration: none;
    padding: 0.5rem 0; /* More padding */
    display: block;
    transition: all 0.2s ease;
    font-weight: 500;
}
.category-link:hover,
.category-link.active {
    color: var(--bs-primary);
    transform: translateX(5px); /* Slight slide on hover/active */
    font-weight: 600;
}


/* Form Select Styling (e.g., in shop.html) */
select.form-select.selection-2 {
    border-radius: 8px; /* Match button/card rounding */
    padding: 0.5rem 1rem;
    height: auto; /* Let padding define height */
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select.form-select.selection-2:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}


/*
   =======================================================================
   5. Footer Specific Styles
   =======================================================================
*/
footer {
    background-color: var(--bs-dark); /* Dark background for footer */
    color: rgba(255, 255, 255, 0.7); /* Lighter text color */
    padding-top: 4rem; /* More padding */
    padding-bottom: 2rem;
    font-size: 0.9rem;
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
    display: block; /* Make links block level */
    padding-bottom: 0.5rem; /* Spacing between links */
}

footer a:hover {
    color: var(--bs-primary); /* Primary color on hover */
    text-decoration: underline;
}

footer .social-icons a {
    font-size: 1.5rem; /* Larger social icons */
    color: rgba(255, 255, 255, 0.6);
    margin-right: 1rem;
    transition: color 0.2s ease;
}

footer .social-icons a:hover {
    color: var(--bs-primary);
}

footer .newsletter-form .form-control {
    border-radius: 8px 0 0 8px; /* Match button style */
    border: none;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}
footer .newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
footer .newsletter-form .btn {
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1.25rem;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}


/* Copyright section (often at the very bottom) */
.footer-bottom {
    background-color: #212529; /* Slightly darker than main footer */
    color: rgba(255, 255, 255, 0.5);
    padding: 1rem 0;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-bottom ul.list-inline a {
    color: rgba(255, 255, 255, 0.5);
}
.footer-bottom ul.list-inline a:hover {
    color: var(--bs-primary);
}


/*
   =======================================================================
   6. Microinteractions and Animation Overrides
   =======================================================================
*/

/* Custom animations for form elements (e.g., checkout page) */
.form-control, .form-select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}


/* Animate.css overrides/integration */
/* If you use Animate.css, remember to add 'animate__animated' class to elements */
/* Example: <h1 class="animate__animated animate__fadeInDown">Title</h1> */
.animate__animated {
    animation-duration: 0.8s; /* Default shorter duration */
    animation-fill-mode: both;
}
.animate__delay-1s { /* Example custom delay */
    animation-delay: 0.5s;
}

/* Confetti effect (requires JS library like 'canvas-confetti') */
/* Confetti styling handled by JS library */


/* Add to Cart confirmation animation (conceptual) */
/* Example:
.add-to-cart-feedback {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--bs-success);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(20px);
    z-index: 1100;
}
.add-to-cart-feedback.show {
    opacity: 1;
    transform: translateY(0);
}
*/


/*
   =======================================================================
   7. Accessibility & Mobile Adjustments (General)
   =======================================================================
*/

/* Ensure sufficient contrast for text, especially on themed backgrounds */
.text-muted {
    color: var(--bs-secondary-text) !important;
}

/* General responsive adjustments */
@media (max-width: 767.98px) { /* Small devices (phones) */
    .hero-content-wrapper {
        padding: 1.5rem;
        max-width: 95%; /* More space for content */
    }
    .wrap-slick1 .item-slick1 {
        min-height: 450px; /* Shorter hero on mobile */
    }
    .navbar-brand .logo-text {
        font-size: 20px;
    }
    .navbar-brand .logo-text b {
        font-size: 24px;
    }
    .form-control.search-input {
        width: 100%;
        border-radius: 8px !important; /* Less rounded on mobile search for simplicity */
    }
    .input-group .btn.search-button {
        border-radius: 8px !important;
        margin-left: 0;
    }
    /* Adjust specific section padding if needed */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}
