/* public/css/site.css */

:root {
    --bs-primary: #ff6a00;
    --bs-primary-rgb: 255, 106, 0;
    --bs-link-color: #ff6a00;
    --bs-link-color-rgb: 255, 106, 0;
    --bs-link-hover-color: #e65f00;
    --bs-link-hover-color-rgb: 230, 95, 0;
    --brand-hover: #e65f00;
    --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--bs-primary);
}

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

.card {
    border: 1px solid #eee;
    border-radius: 10px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

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

.mega-menu {
    min-width: 640px;
}

/* Hide the desktop mega-menu below lg via a media query, not a d-lg-block
   utility class on the element — that utility sets display with
   !important, which beat the (non-!important) rule Bootstrap's own
   dropdown JS uses to show/hide it via a .show class, forcing the menu
   permanently visible on desktop regardless of open/closed state. A
   max-width query never applies at lg+, so it can't compete with that
   rule there. */
@media (max-width: 991.98px) {
    .mega-menu {
        display: none !important;
    }
}

/* Header search box: a flex item's default min-width is `auto`, which lets
   the input's long placeholder push it (and its form) wider than the
   viewport on mobile instead of shrinking to fit. */
.site-search-form,
.site-search-form input[type="search"] {
    min-width: 0;
}

@media (max-width: 991.98px) {
    .site-search-form {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Search auto-suggest dropdown (public/js/search-suggest.js): the results
   list is empty and hidden until JS populates it and adds .is-open. */
.search-suggest-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    margin-top: 0.25rem;
    padding: 0.25rem 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 320px;
    overflow-y: auto;
}

.search-suggest-results.is-open {
    display: block;
}

.search-suggest-item {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #212529;
    text-decoration: none;
}

.search-suggest-item mark {
    background: none;
    color: inherit;
    font-weight: 600;
    padding: 0;
}

.search-suggest-item:hover,
.search-suggest-item.is-active {
    background: #f1f3f5;
}

/* Mobile category drill-down (Products nav item on mobile — see
   resources/views/partials/mobile-category-panel.blade.php). Every panel
   is hidden by default; JS (public/js/mobile-category-nav.js) toggles
   .is-active on exactly one panel at a time and .mcn-hidden on the rest
   of the mobile nav while a drill-down is open. */
.mcn-panel {
    display: none;
}

.mcn-panel.is-active {
    display: block;
}

.mcn-hidden {
    display: none !important;
}

.mcn-open-trigger,
.mcn-back,
.mcn-drill-in {
    border: 0;
    background: none;
    padding: 0.5rem 0;
}

.mcn-open-trigger,
.mcn-back {
    width: 100%;
    text-align: left;
}

.mcn-back {
    font-weight: 600;
}

.mcn-drill-in {
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}

.mcn-row-link {
    display: block;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: none;
}

/* Sticky footer: keep the footer pinned to the bottom of the viewport even
   when a page has little content (e.g. a category with no children/products),
   instead of floating up into the middle of the screen. */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1 0 auto;
}

body > footer {
    flex-shrink: 0;
}

footer {
    background-color: #1c1c1c !important;
    color: #dee2e6;
}

footer address {
    font-style: normal;
}

footer a {
    color: #f1f3f5;
    text-decoration: none;
}

footer a:hover,
footer a:focus {
    color: var(--bs-primary);
    text-decoration: underline;
}

.text-primary {
    color: var(--bs-primary) !important;
}

.breadcrumb-item a {
    color: var(--bs-primary);
}

/* Product image carousel controls sit over a light letterbox background,
   so the default white arrows are invisible -- give them a dark backing. */
#productImagesCarousel .carousel-control-prev-icon,
#productImagesCarousel .carousel-control-next-icon {
    background-color: rgba(28, 28, 28, 0.6);
    border-radius: 50%;
    padding: 1.1rem;
    background-size: 50% 50%;
}

#productImagesCarousel .carousel-control-prev,
#productImagesCarousel .carousel-control-next {
    width: 10%;
    opacity: 1;
}

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #212529;
    color: #fff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.product-card {
    width: 332px;
    max-width: 100%;
    height: 308px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.product-card-img {
    height: 160px;
    object-fit: cover;
}

.product-card-title {
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-desc {
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
