/* ==========================================================================
   1. Reset/Normalize (Optional, but good practice if not using Bootstrap's Reboot fully)
   ========================================================================== */
/* Bootstrap's Reboot (from bootstrap.min.css) handles a lot of this.
   If you need specific overrides or additions, place them here. */
* {
    box-sizing: border-box; /* Often good to ensure consistent box model */
}

/* ==========================================================================
   2. Base Styles / HTML Element Defaults
   ========================================================================== */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex; /* For sticky footer pattern */
    flex-direction: column; /* For sticky footer pattern */
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
}

/* Base heading styles (Bootstrap provides defaults, customize if needed) */
h1, h2, h3, h4, h5, h6 {
     margin-top: 0.5rem; 
     margin-bottom: 0.5rem; 
    /* font-weight: 600;*/ 
}

a {
    color: #007bff; /* Default link color (Bootstrap primary) */
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}
.navbar,.nav-link{
    background-color: #013873;
    color: #cce5ff;
}

.navbar-brand h2 {
    /*font-weight: 600;  Extra Bold */
    font-size: 2.0rem; /* Make it a bit larger */
    margin: 0; 
    display: inline-block;
    color: #cce5ff;
}
/* --- General Site Header (If not solely relying on Bootstrap Navbar) --- */
header.site-header-custom { /* Renamed to avoid conflict with semantic <header> */
    background-color: #333;
    color: #fff;
    padding: 1em 0;
    text-align: center;
}
header.site-header-custom h1 {
    margin: 0;
}
/* Navigation within custom header */
header.site-header-custom nav a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
}
header.site-header-custom nav a:hover {
    text-decoration: underline;
}

/* --- Main Content Area for Simple/Standard Pages --- */
/* This 'main' style is for pages that DON'T use the flexbox product layout */
main.general-content-area {
    padding: 20px;
    max-width: 960px;
    margin: 20px auto; /* Centers content */
    background-color: #ffffffdc;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex-grow: 1; /* For sticky footer */
}

/* --- Footer --- */
.site-footer { /* Using a class for the main site footer */
    text-align: center;
    padding: 20px;
    /* margin-top: 20px; Removed, flex-grow on main content handles pushing it down */
    font-size: 0.9em;
    color: #777;
    background-color: #e9e9e9; /* Example footer background */
    width: 100%;
}

/* ==========================================================================
   4. Layout Styles - Specific Page Layouts
   ========================================================================== */

/* --- Product Page Layout (Main Content + Conditional Sidebar) --- */
.main-layout-container {
    display: flex;
    flex-grow: 1; /* Allows this container to fill vertical space */
}

.main-content-wrapper {
    flex-grow: 1; /* Takes up available space */
    flex-basis: 0;   /* Important for flex-grow with sibling */
    /* Padding can be applied directly or via Bootstrap utility classes (e.g., p-3) */
}

.right-flank-wrapper {
    flex-shrink: 0; /* Prevents sidebar from shrinking */
    flex-basis: 25%; /* Desired width when it has content */
    /* max-width: 320px; /* Optional: constraint */
}
/* Hiding empty sidebar */
.right-flank-wrapper:empty,
.right-flank-wrapper.is-empty { /* Add .is-empty class via JS/PHP if :empty is unreliable */
    display: none;
}
/* Responsive stacking for product page layout */
@media (max-width: 991.98px) { /* Bootstrap's lg breakpoint */
    .main-layout-container {
        flex-direction: column;
    }
    .main-content-wrapper,
    .right-flank-wrapper {
        flex-basis: auto; /* Take full width when stacked */
        width: 100%;
        max-width: none;
    }
    .right-flank-wrapper.has-content { /* Add .has-content if it's not empty for stacking margin */
        margin-top: 1.5rem; /* Space when stacked */
    }
}

/* --- Body style for Centered Form Pages (Optional) --- */
.form-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Takes full viewport height for centering */
    padding: 20px; /* Add some padding so form doesn't touch edges on small screens */
}

/* ==========================================================================
   5. Component Styles (Reusable UI elements)
   ========================================================================== */

/* --- Forms --- */
.form-container { /* Wrapper for a standalone form (e.g., login, register) */
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px; /* Max width for the form itself */
    /* If not using .form-page-body for centering, add margin: 40px auto; */
}
.form-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"], /* Added number */
.form-group input[type="tel"],    /* Added telephone */
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* box-sizing: border-box; Already set globally */
    font-size: 1rem;
    line-height: 1.5; /* Ensure consistent line height */
}
/* Optional: Custom select arrow (if removing default appearance) */
/* .form-group select { appearance: none; ... } */

.form-group input[type="submit"],
button.form-submit-button { /* Using a class for submit buttons for better control */
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem; /* Consistent with inputs */
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
}
.form-group input[type="submit"]:hover,
button.form-submit-button:hover {
    background-color: #0056b3;
}

.form-link { /* For "Already have an account? Login" type links */
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
}
.form-link a {
    color: #007bff;
    /* text-decoration: none; (inherited) */
}
/* .form-link a:hover { text-decoration: underline; (inherited) } */

/* Inline error messages for form fields */
.form-group .error-text {
    display: block;
    color: #dc3545; /* Bootstrap danger color */
    font-size: 0.85em;
    margin-top: 4px;
}

/* --- Multi-Column Form Layout --- */
.form-row-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Space between columns */
    margin-bottom: 20px; /* Space below the row */
}
.form-column {
    flex: 1; /* Each column tries to take equal space */
    min-width: 280px; /* Minimum width before wrapping/stacking */
}
.form-column h3 { /* Heading for a section within a multi-column form */
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #444;
    /* border-bottom: 1px solid #eee; */
    /* padding-bottom: 10px; */
}
/* Responsive stacking for multi-column forms */
@media (max-width: 768px) {
    .form-row-container {
        flex-direction: column;
        gap: 0; /* Remove horizontal gap when stacked */
    }
    .form-column {
        min-width: 100%; /* Full width when stacked */
        margin-bottom: 20px;
    }
    .form-column:last-child {
        margin-bottom: 0;
    }
}

/* --- Messages (Error, Success, Info, Warning) --- */
.message { /* Base message style */
    padding: 12px 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9em;
    text-align: left;
}
.message.error-message {
    background-color: #f8d7da; color: #721c24; border-color: #f5c6cb;
}
.message.success-message {
    background-color: #d4edda; color: #155724; border-color: #c3e6cb;
}
.message.info-message {
    background-color: #cce5ff; color: #004085; border-color: #b8daff;
}
.message.warning-message {
    background-color: #fff3cd; color: #856404; border-color: #ffeeba;
}

/* --- Horizontal Scroll Products --- */
.horizontal-scroll-products {
    display: flex;
    overflow-x: auto;
    padding-bottom: 1rem;
    gap: 1rem;
}
.horizontal-scroll-products .product-card-sm { /* Assuming Bootstrap card structure */
    min-width: 180px; /* Or your desired card width */
    flex-shrink: 0; /* Prevent cards from shrinking */
}
.horizontal-scroll-products::-webkit-scrollbar { height: 8px; }
.horizontal-scroll-products::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* --- Cookie Consent Banner & Modal --- */
#cookie-consent-banner {
    display: none; /* Initially hidden, shown by JS */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: white;
    padding: 15px 20px;
    text-align: center;
    z-index: 1050; /* Ensure high visibility */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
#cookie-consent-banner p {
    margin: 0 0 10px 0;
    font-size: 0.95em;
}
#cookie-consent-banner a {
    color: #61dafb; /* Example bright link */
    /* text-decoration: underline; (inherited) */
}
#cookie-consent-banner button { /* General button style within banner */
    border: none;
    padding: 10px 15px;
    margin: 5px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
}
#cookie-accept-all { background-color: #28a745; color: white; }
#cookie-decline-non-essential { background-color: #dc3545; color: white; }
#cookie-manage-preferences { background-color: #007bff; color: white; }

#cookie-preferences-modal {
    display: none; /* JS toggles to 'flex' for centered display */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 1055; /* Above banner */
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Allow modal to scroll if content is tall */
    padding: 20px; /* Padding for small screens so modal doesn't touch edges */
}
.cookie-preferences-modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    width: 100%; /* Full width on small screens within modal padding */
    max-width: 550px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    color: #333;
    position: relative; /* For potential close button positioning */
}
.cookie-preferences-modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #212529;
}
.cookie-preferences-modal-content p {
    font-size: 0.9em;
    margin-bottom: 15px;
}
.cookie-preferences-modal-content label { /* For checkboxes */
    display: flex; /* Align checkbox and text nicely */
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95em;
    cursor: pointer;
}
.cookie-preferences-modal-content input[type="checkbox"] {
    margin-right: 10px; /* Increased margin */
    /* vertical-align: middle; (handled by flex on label) */
    width: auto; /* Override general form input width */
    flex-shrink: 0; /* Prevent checkbox from shrinking */
}
.cookie-preferences-modal-content .modal-actions {
    margin-top: 25px;
    text-align: right;
    display: flex; /* For better button spacing */
    flex-wrap: wrap; /* Allow buttons to wrap on small screens */
    justify-content: flex-end;
    gap: 10px; /* Space between buttons */
}
.cookie-preferences-modal-content .modal-actions button {
    border: none;
    padding: 10px 18px;
    /* margin-left: 10px; (gap handles spacing) */
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
}
#cookie-save-preferences { background-color: #28a745; color: white; }
#cookie-pref-modal-close-btn { background-color: #6c757d; color: white; }

.cookie-preferences-modal-content .policy-link {
    font-size: 0.85em;
    margin-top: 20px;
    display: block;
}
/* .cookie-preferences-modal-content .policy-link a { ... (inherited) ... } */

/* ===============================
   6. Utility Classes (Helper classes)
   =============================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none !important; } /* Similar to Bootstrap */
.d-block { display: block !important; }
.d-flex { display: flex !important; }
/* Add more utility classes as needed, or rely on Bootstrap's */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

    /* =========================
      HOMEPAGE SPECIFIC STYLES
      ========================== */

   body.homepage {
       /* Example: A distinct background for the homepage */
       /* background-color: #f0f8ff; /* Light alice blue */
       /* Or an image: */
       /* background-image: url('..asstes/images/homepage-banner.jpg'); */ /* Adjust path as needed */
       /* background-size: cover; */
       /* background-position: center center; */
       /* background-repeat: no-repeat; */
       /* background-attachment: fixed; /* Optional: for parallax-like effect */
   }

   /* Example: Make navbar transparent ONLY on homepage and text darker/lighter if needed */
   body.homepage .navbar {
       /* background-color: transparent !important; /* Use !important cautiously */
       /* border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Example if on dark bg */
   }
   /* body.homepage .navbar-brand,
   body.homepage .navbar-nav .nav-link {
       color: #fff !important; /* Example if navbar is transparent on dark homepage bg */
   /* } */


   /* Styles for a prominent hero unit on the homepage */
   body.homepage .hero-section {
       padding: 80px 15px; /* Adjust padding as needed */
       text-align: center;
       /* background-color: #333; /* Example dark background for hero */
       /* color: white; */
       min-height: 70vh; /* Make it take up a good portion of the viewport */
       display: flex;
       flex-direction: column;
       justify-content: center;
       align-items: center;
   }

   body.homepage .hero-section h1 {
       font-size: 3rem; /* Larger heading for hero */
       font-weight: bold;
       margin-bottom: 20px;
   }

   body.homepage .hero-section .lead {
       font-size: 1.25rem;
       margin-bottom: 30px;
   }

   /* Styles for other homepage-specific sections */
   body.homepage .featured-content-section {
       padding: 60px 15px;
       /* background-color: #f8f9fa; /* Light background for contrast */
   }

   body.homepage .cta-section {
       padding: 60px 15px;
       background-color: #0d6efd; /* Bootstrap primary blue */
       color: white;
       text-align: center;
   }


   /* Example if you make main.container full-width on homepage */
   /* Be careful with broad changes to .container if other elements inside rely on its padding */
   /* body.homepage main.container {
       max-width: 100%;
       padding-left: 0;
       padding-right: 0;
   } */

   /* Any other specific styles for elements ONLY on the homepage */
   /* body.homepage .some-custom-homepage-element { ... } */

   /* ===============================================
      END OF HOMEPAGE SPECIFIC STYLES
      =============================================== */

   /* ... (any other existing general styles) ... */

