/* Storefront styles extracted from templates/base.html (audit 4.5).
   Served as a cacheable, versioned static asset instead of ~27KB of
   inline CSS re-transmitted with every HTML response. Brand variables
   stay inlined via static/css/theme.css. */

/* Base Styles */
:root {
    --primary-bg: #1a1a1a;
    --secondary-bg: #343a40;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.85);
    --hover-color: #f8f9fa;
    --border-color: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.3s;
    --accent-color: #a55c1d;
    --accent-hover: #8a4c18;
    --accent-light: rgba(165, 92, 29, 0.1);
}

/* Typography - Global Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video, button, input, textarea, select {
    font-family: 'Noto Sans', 'Poppins', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* The global reset above lists `i`, so its !important font-family would
   otherwise override FontAwesome on every <i class="fas …"> and hide every
   icon (cart, +/-, trash, search, shipping, etc.). Restore the FA 5 webfont
   for icon classes — higher specificity than the bare `i` selector, also
   !important so it wins the cascade. Keep in sync with the FA version in
   base.html (currently FontAwesome 5.15.4). */
.fa, .fas, .far, .fal {
    font-family: 'Font Awesome 5 Free' !important;
}
.fab {
    font-family: 'Font Awesome 5 Brands' !important;
}

body {
    font-family: 'Noto Sans', 'Poppins', sans-serif !important;
    background-color: #ffffff;
    color: #333333;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Price Styles */
.price, .product-price, .price-value, .price-amount, .price-tag {
    font-weight: 600;
    font-size: 1rem;
    color: #a55c1d !important;
}

.price-old {
    text-decoration: line-through;
    color: #6c757d !important;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.price-new {
    color: #a55c1d !important;
    font-weight: 600;
}

.stock-status .badge {
    font-weight: 500;
    font-size: 0.85rem;
}

.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    transition: all var(--transition-speed);
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(165, 92, 29, 0.25);
    outline: none;
}

.btn-primary {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-light) !important;
}

.btn-primary:hover {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: var(--text-light) !important;
}

.btn-primary:active {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: var(--text-light) !important;
}

.btn-primary:focus {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(165, 92, 29, 0.25) !important;
}

.btn-primary:focus-visible {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-light) !important;
}

.btn-outline-primary {
    color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-light) !important;
}

.btn-outline-primary:active {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: var(--text-light) !important;
}

.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(165, 92, 29, 0.25) !important;
}

.btn-outline-primary:focus-visible {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-light) !important;
}

.nav-link {
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: none;
}

.store-name {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

/* Form Elements */
.form-control, .form-select {
    font-weight: 400;
    font-size: 1rem;
}

/* Dropdowns */
.dropdown-menu, .dropdown-item {
    font-weight: 400;
    font-size: 1rem;
}

/* Alerts and Badges */
.alert, .badge {
    font-weight: 500;
    font-size: 1rem;
}

/* Table Text */
.table th, .table td {
    font-weight: 400;
    font-size: 1rem;
}

.table th {
    font-weight: 600;
}

/* Pagination */
.pagination .page-link {
    font-weight: 500;
    font-size: 1rem;
}

/* Footer Text */
footer h5 {
    font-weight: 600;
    font-size: 1.1rem;
}

footer p {
    font-weight: 400;
    font-size: 1rem;
}

/* Header Styles */
.top-bar {
    background: var(--primary-bg);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.top-bar a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.top-bar a:hover {
    color: var(--hover-color);
}

/* Navigation Styles */
.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Desktop navigation spacing */
@media (min-width: 992px) {
    .main-nav {
        margin-left: 1.5rem;
    }
}

.main-nav .nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all var(--transition-speed);
}

.main-nav .nav-link:hover {
    color: var(--hover-color);
}

.main-nav .nav-link.active {
    color: var(--text-light);
    font-weight: 500;
}

.main-nav .nav-link.active::after {
    display: none;
}

/* Mobile Menu Styles */
@media (max-width: 991.98px) {
    .top-bar {
        padding: 0.5rem 0;
        position: relative;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: var(--primary-bg);
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        z-index: 1000;
        overflow-y: auto;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
        width: 100%;
        max-height: 100vh;
    }

    /* Position mobile menu below announcement bar when it exists */
    body:has(.announcement-bar) .main-nav {
        top: var(--announcement-bar-height, 0);
    }

    .main-nav.show {
        display: flex;
        transform: translateX(0);
    }

    .main-nav .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem 0.75rem 3rem;
        border-radius: 0.25rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
        margin-left: 0;
    }

    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

    .main-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .main-nav .nav-link.active::after {
        display: none;
    }

    .main-nav .nav-link.active {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--text-light);
        font-size: 1.5rem;
        padding: 0.5rem;
        cursor: pointer;
        transition: color var(--transition-speed);
        z-index: 1001;
        margin-right: 1rem;
    }

    .mobile-menu-toggle:hover {
        color: var(--hover-color);
    }

    .mobile-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        color: var(--text-light);
        font-size: 1.5rem;
        cursor: pointer;
        display: none;
        background: none;
        border: none;
        padding: 0.5rem;
        z-index: 1002;
    }

    .main-nav.show + .mobile-menu-close {
        display: block;
    }

    /* Overlay for when menu is open */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .menu-overlay.show {
        display: block;
    }
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Footer Styles */
footer {
    background-color: var(--primary-bg);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: 3rem;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

footer p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Container Styles */
.container {
    max-width: 1200px;
    padding: 0 1rem;
    margin: 0 auto;
}

/* Main Content Styles */
.main-content {
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
    padding: 2rem 0;
}

/* Section Spacing */
.section {
    margin-bottom: 3rem;
}

/* Button Styles */
/* Card Styles */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    overflow: hidden;
}

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

.card-img-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Creates a square aspect ratio */
    overflow: hidden;
    background-color: #f8f9fa;
}

.card-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

.card:hover .card-img-container img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.25rem;
}

/* Form Styles */
.form-control {
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(165, 92, 29, 0.25);
}

/* Font Awesome Icon Styles */
.fa-search, .fa-arrow-left {
    color: var(--text-light);
    font-size: 1rem;
}

.btn-outline-light .fa-search {
    color: var(--text-light);
}

.btn-outline-light:hover .fa-search {
    color: var(--accent-color);
}

/* Link Styles */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-hover);
}

/* Badge Styles */
.badge.bg-primary {
    background-color: var(--accent-color) !important;
}

/* Table Styles */
.table thead th {
    background-color: var(--accent-light);
    border-bottom: 2px solid var(--accent-color);
}

/* Pagination Styles */
.page-link {
    color: var(--accent-color);
    border-color: var(--border-color);
}

.page-link:hover {
    color: var(--accent-hover);
    background-color: var(--accent-light);
    border-color: var(--border-color);
}

.page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Alert Styles */
.alert-primary {
    background-color: var(--accent-light);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Progress Bar Styles */
.progress-bar {
    background-color: var(--accent-color);
}

/* List Group Styles */
.list-group-item.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-hover);
}

/* View Details Button Styles */
.btn-view-details {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    transition: all var(--transition-speed);
}

.btn-view-details:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Search Container Styles */
.search-container {
    position: relative;
    margin-left: 2rem;
    margin-right: 2rem;
    max-width: 300px;
    width: 100%;
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input {
    flex: 1;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all var(--transition-speed);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    box-shadow: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-light);
    padding: 0.5rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.search-btn:hover {
    color: var(--hover-color);
}

.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.mobile-search-toggle:hover {
    color: var(--hover-color);
}

@media (max-width: 991.98px) {
    .search-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-bg);
        padding: 1rem;
        max-width: none;
        display: none;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        margin: 0;
    }

    .search-container.show {
        display: block;
    }

    .mobile-search-toggle {
        display: block;
        margin-left: auto;
    }

    .search-form {
        margin-top: 0.5rem;
    }
    
    /* Move search and cart icons away from right edge on mobile */
    .top-bar .d-flex.align-items-center:last-child {
        padding-right: 0.25rem;
    }
}

@media (max-width: 767.98px) {
    .col-md-6.text-md-end {
        margin-top: 2rem;
    }
    
    /* Additional spacing for very small mobile screens */
    .top-bar .d-flex.align-items-center:last-child {
        padding-right: 0.375rem;
    }
}

/* Responsive text sizing for mobile */
@media (max-width: 768px) {
    .card-title {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .card-text {
        font-size: 0.8rem;
    }
    
    .card-img-container {
        padding-top: 100%; /* Maintain square aspect ratio on mobile */
    }
    
    /* Mobile price sizing */
    .price, .product-price, .price-value, .price-amount, .price-tag {
        font-size: 0.9rem !important;
    }
}

/* Free Shipping Announcement Bar */
.announcement-bar {
    background: linear-gradient(135deg, #d4af37, #f4d03f, #d4af37);
    color: #1a1a1a;
    padding: 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Set CSS custom property for announcement bar height */
:root {
    --announcement-bar-height: 60px; /* Default height for desktop */
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
    gap: 0;
    flex-wrap: wrap;
}

.announcement-text {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}


.announcement-bar i.fa-truck {
    color: #1a1a1a;
    font-size: 1rem;
    margin-right: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .announcement-bar {
        padding: 0.6rem 0;
        font-size: 0.85rem;
    }
    
    .announcement-content {
        padding: 0 1rem;
        gap: 0;
        flex-wrap: wrap;
    }
    
    .announcement-text {
        text-align: center;
        white-space: normal;
        line-height: 1.4;
        word-wrap: break-word;
    }

    /* Update announcement bar height for mobile */
    :root {
        --announcement-bar-height: 50px;
    }
}

@media (max-width: 576px) {
    .announcement-bar {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }
    
    .announcement-content {
        padding: 0 0.75rem;
        gap: 0;
        flex-wrap: wrap;
    }
    
    .announcement-text {
        line-height: 1.4;
        text-align: center;
        white-space: normal;
        word-wrap: break-word;
    }

    /* Update announcement bar height for small mobile */
    :root {
        --announcement-bar-height: 45px;
    }
}

@media (max-width: 400px) {
    .announcement-bar {
        font-size: 0.75rem;
        padding: 0.4rem 0;
    }
    
    .announcement-content {
        padding: 0 0.5rem;
    }

    /* Update announcement bar height for very small mobile */
    :root {
        --announcement-bar-height: 40px;
    }
}
    /* Toast Notification Styles */
    .modern-cart-notification {
position: fixed;
top: 20px;
right: 20px;
z-index: 9999;
max-width: 400px;
background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
border: 1px solid #e9ecef;
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
transform: translateX(100%);
opacity: 0;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
backdrop-filter: blur(10px);
    }

    .modern-cart-notification.show {
transform: translateX(0);
opacity: 1;
    }

    .notification-content {
display: flex;
align-items: center;
padding: 16px 20px;
gap: 16px;
    }

    .notification-icon {
width: 48px;
height: 48px;
border-radius: 50%;
background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 20px;
flex-shrink: 0;
box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }

    .notification-icon.error {
background: linear-gradient(135deg, #dc3545 0%, #e74c5c 100%);
box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }

    .notification-text {
flex-grow: 1;
min-width: 0;
    }

    .notification-message {
font-size: 14px;
color: #6c757d;
line-height: 1.4;
    }

    .notification-close {
width: 32px;
height: 32px;
border: none;
background: #f8f9fa;
border-radius: 50%;
color: #6c757d;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
flex-shrink: 0;
    }

    .notification-close:hover {
background: #e9ecef;
color: #495057;
transform: scale(1.1);
    }

    .notification-close:active {
transform: scale(0.95);
    }

    @media (max-width: 768px) {
.modern-cart-notification {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    transform: translateY(-100%);
}

.modern-cart-notification.show {
    transform: translateY(0);
}

.notification-content {
    padding: 14px 16px;
    gap: 12px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.notification-message {
    font-size: 13px;
}
    }
