/* Common CSS for both mobile and desktop */

/* Form styling */
.form-layout {
    border-radius: 20px;
    width: 500px;
}

/* Message timer */
#message-timer {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Global Messages Styling */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert i {
    font-size: 1.1em;
}

/* Site-wide promotion banner */
.site-promo-banner {
    background-color: #111;
    color: #fff;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    text-align: center;
}

.site-promo-banner.promo-anim-slide-up {
    transition: opacity 0.35s ease, transform 0.35s ease;
    transform: translateY(0);
}

.site-promo-banner.promo-anim-slide-up.is-fading {
    opacity: 0;
    transform: translateY(6px);
}

.site-promo-banner .container-fluid {
    display: block;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
}

.site-promo-banner .promo-title,
.site-promo-banner .promo-sub,
.site-promo-banner .promo-cta,
.site-promo-banner .promo-sep {
    display: inline-block;
    margin: 0 0.08rem;
}

.site-promo-banner .promo-title {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.site-promo-banner .promo-sub {
    opacity: 0.85;
}

.site-promo-banner .promo-cta {
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 0.2rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: inherit;
}

.site-promo-banner .promo-cta:hover {
    color: #fff;
    border-color: #fff;
}

.site-promo-banner .promo-cta.promo-cta-disabled {
    cursor: text;
    pointer-events: auto;
    opacity: 0.9;
    user-select: text;
}

/* Common button styles */
.btn {
    /* No transitions or transforms */
}

.btn:hover {
    /* No hover effects */
}

/* Common link styles */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* Site footer */
body.site-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-footer {
    background-color: #f7f8fb;
    border-top: 1px solid #e5e7eb;
    padding: 1.1rem 0 1.6rem;
    margin-top: auto;
}

.site-footer .container {
    display: block;
}

.footer-brand {
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #111;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.footer-links a {
    color: #4a5568;
    text-decoration: none;
}

.footer-links a:hover {
    color: #111;
    text-decoration: none;
    padding-left: 4px;
    transition: all 0.2s ease;
}

.site-footer h6 {
    letter-spacing: 0.08em;
    color: #111;
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.site-footer .row {
    margin-bottom: 0;
}

.site-footer .border-top {
    border-color: #e5e7eb !important;
}

.back-to-top-fab {
    position: fixed;
    right: 1rem;
    bottom: 2.2rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.back-to-top-fab:hover {
    color: #fff;
    transform: translateY(0);
}

.back-to-top-fab.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    color: #111;
    font-size: 0.95rem;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.footer-social img {
    height: 26px;
    width: 26px;
    display: block;
    object-fit: contain;
}

.footer-social a:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.site-footer .form-control,
.site-footer .form-select {
    background-color: #fff;
}

.site-footer .btn-primary {
    box-shadow: none;
}

.footer-subscribe {
    flex-wrap: wrap;
}

.footer-subscribe .form-control {
    min-width: 180px;
    flex: 1 1 200px;
}

.footer-subscribe .btn {
    white-space: nowrap;
}

.footer-payment-icon,
.footer-shipping-icon {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Help & Support columns on mobile */
@media (max-width: 991px) {
    .help-support-columns {
        column-count: 2;
        column-gap: 1rem;
    }
}

.footer-brands {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.85rem;
    margin-top: 0.85rem;
}

.footer-brands-top {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.7rem;
}

.footer-brand-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}

.footer-brand-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 140px;
}

.footer-brand-letter {
    font-weight: 700;
    font-size: 0.7rem;
    color: #111;
    min-width: 20px;
}

.footer-brand-items {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.footer-brand-items a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.2;
}

.footer-brand-items a:hover {
    color: #111;
    text-decoration: none;
}

@media (max-width: 768px) {
    .footer-brand-picker {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
        gap: 0.35rem;
        margin-bottom: 0.6rem;
    }

    .footer-brand-pill {
        border: 1px solid #e5e7eb;
        background: #fff;
        color: #111;
        font-weight: 600;
        font-size: 0.95rem;
        border-radius: 999px;
        padding: 0.25rem 0;
        line-height: 1;
        text-align: center;
    }

    .footer-brand-pill.is-active {
        background: #111;
        color: #fff;
        border-color: #111;
    }

    .footer-brand-panels {
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 0.6rem 0.7rem;
        background: #fff;
    }

    .footer-brand-panel {
        display: none;
    }

    .footer-brand-panel.is-active {
        display: block;
    }

    .footer-brand-panels .footer-brand-items {
        columns: 2;
        column-gap: 1rem;
    }

    .footer-brand-panels .footer-brand-items a {
        font-size: 0.9rem;
        break-inside: avoid;
        padding: 0.1rem 0;
    }
}

@media (max-width: 768px) {
    .footer-brand-group {
        min-width: 100%;
    }
}

/* Cookie consent banner */
.cookie-consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    background: #111;
    color: #fff;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cookie-consent-content {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.cookie-consent-content .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .footer-social a {
        width: 30px;
        height: 30px;
    }

    .cookie-consent-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Common container styles */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Common navbar brand styling */
.navbar-brand {
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #1a202c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.navbar-brand:hover {
    text-decoration: none;
}

/* Desktop search bar styling */
.search-bar-desktop {
    width: 450px;
    min-width: 350px;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    overflow: visible !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

/* Left separator line */
.search-bar-desktop::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 25%;
    height: 50%;
    width: 1px;
    background-color: #e2e8f0;
    pointer-events: none;
    z-index: 100;
}

/* Right separator line */
.search-bar-desktop::after {
    content: '';
    position: absolute;
    right: 50px;
    top: 25%;
    height: 50%;
    width: 1px;
    background-color: #e2e8f0;
    pointer-events: none;
    z-index: 100;
}

.search-bar-desktop:focus-within {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.search-bar-desktop .form-control {
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    border-radius: 0;
    background-color: white;
    transition: all 0.3s ease;
}

.search-bar-desktop .form-control:focus {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.search-bar-desktop button[type="submit"] {
    padding: 0.75rem 1rem;
    flex-shrink: 0;
    flex-grow: 0;
    white-space: nowrap;
    min-width: 50px;
    max-width: 56px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none !important;
    border-radius: 0 50px 50px 0;
    transition: box-shadow 0.3s ease;
}

.search-bar-desktop button[type="submit"]:focus,
.search-bar-desktop button[type="submit"]:active {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}


/* Search submit button with gradient */
.search-bar-desktop button[type="submit"] i,
.search-bar-mobile button[type="submit"] i {
    font-size: 0.95rem;
    margin: 0;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ensure navbar has higher z-index than subcategories */
.navbar {
    position: relative;
    z-index: 1050;
    overflow: visible !important;
}

/* Category search dropdown - clean styling */
.category-search-dropdown {
    position: relative !important;
}

.category-search-dropdown .btn {
    padding: 0.75rem 1rem;
    flex-shrink: 0;
    flex-grow: 0;
    white-space: nowrap;
    min-width: 50px;
    max-width: 56px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none !important;
    border-radius: 50px 0 0 50px;
    transition: box-shadow 0.3s ease;
}

.category-search-dropdown .btn:focus,
.category-search-dropdown .btn:active,
.category-search-dropdown .btn.active,
.category-search-dropdown .btn.show {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}


.category-search-dropdown .btn i {
    font-size: 0.95rem;
    margin: 0;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-search-dropdown .dropdown-menu {
    background-color: white !important;
    border: 1px solid #dee2e6 !important;
    position: absolute !important;
    z-index: 10500 !important;
    top: calc(100% + 2px) !important;
    left: 0 !important;
}

.category-search-dropdown .dropdown-item {
    color: #212529;
}

.category-search-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.category-search-dropdown .dropdown-item.active {
    background-color: #0d6efd;
    color: white;
}

/* General input-group styling to prevent wrapping - only for search bars */
.search-bar-desktop .input-group,
.d-lg-none .flex-grow-1 .input-group,
.filter-card .input-group,
form[action*="search"] .input-group,
form[action*="orders"] .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
}

.search-bar-desktop .input-group .form-control,
.d-lg-none .flex-grow-1 .input-group .form-control,
.filter-card .input-group .form-control,
form[action*="search"] .input-group .form-control,
form[action*="orders"] .input-group .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.search-bar-desktop .input-group .btn,
.d-lg-none .flex-grow-1 .input-group .btn,
.filter-card .input-group .btn,
form[action*="search"] .input-group .btn,
form[action*="orders"] .input-group .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Ensure password fields and other form inputs are NOT affected */
.password-field-wrapper,
.form-group:not(.input-group),
.form-control:not(.input-group .form-control) {
    /* Reset any input-group styles that might leak */
    flex: none !important;
}

/* Profile dropdown styling */
.profile-dropdown {
    min-width: 200px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    top: 100% !important;
    bottom: auto !important;
    transform: none !important;
}

.profile-dropdown .dropdown-item {
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    color: #333;
}

.profile-dropdown .dropdown-item:hover {
    text-decoration: none;
}

.profile-dropdown .dropdown-item.disabled {
    color: #6c757d;
    cursor: not-allowed;
}

.profile-dropdown .dropdown-item.disabled:hover {
    background-color: transparent;
    color: #6c757d;
}

.profile-dropdown .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e9ecef;
}

.profile-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
}

.account-dropdown .dropdown-item {
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
}

.account-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Override Bootstrap default dropdown hover effects with subtle highlighting */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa !important;
    color: inherit !important;
    text-decoration: none !important;
}

/* Light hover effects on dropdown toggle buttons */
.btn-link.dropdown-toggle {
    transition: background-color 0.2s ease;
    border-radius: 8px;
}

.btn-link.dropdown-toggle:hover,
.btn-link.dropdown-toggle:focus {
    background-color: #f8f9fa !important;
    text-decoration: none !important;
}

/* Common icon styling */
.fas {
    transition: all 0.3s ease;
}

/* Common alert styling */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Common card styling */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Common input styling */
.form-control {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

/* Common badge styling */
.badge {
    border-radius: 4px;
    font-weight: 500;
}

/* Common spacing utilities */
.mt-10 {
    margin-top: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

/* Common text utilities */
.text-muted {
    color: #6c757d !important;
}

.text-black {
    color: #000 !important;
}

/* Active navigation link styling */
.nav-link.text-primary.fw-bold {
    color: #0d6efd !important;
    font-weight: bold !important;
}

/* More specific rule for top category links */
.navbar-nav .nav-item .nav-link.text-primary.fw-bold.top-category-link {
    color: #0d6efd !important;
    font-weight: bold !important;
}

/* Common background utilities */
.bg-light {
    background-color: #f8f9fa !important;
}

/* Common border utilities */
.border-light {
    border-color: #dee2e6 !important;
}

/* Common shadow utilities */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Common transition utilities */
.transition {
    transition: all 0.3s ease;
}

/* Common hover effects */
.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Common focus states */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

/* Remove button focus styles globally */
.btn:focus,
.btn:focus-visible,
.btn:active:focus,
.btn.active:focus,
.btn.show:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure navbar doesn't clip dropdowns */
.navbar,
.navbar .container-fluid,
.navbar-collapse {
    overflow: visible !important;
}
