/* =====================================================================
   Image Internacional — design system
   Palette: orange + charcoal/grey.  Fonts: Montserrat (headings) + Inter (body).
   NOTE: the old --primary-blue / --primary-yellow / --primary-black names are
   kept as aliases mapped to the new brand colors, so legacy inline styles
   (e.g. style="color: var(--primary-blue)") pick up the rebrand automatically.
   ===================================================================== */
:root {
    --primary-orange: #f58220;
    --primary-orange-dark: #d96d12;
    --primary-charcoal: #2b2b2b;
    --primary-grey: #6e6e6e;
    --primary-white: #ffffff;
    --light-bg: #f5f5f5;

    /* Legacy aliases → brand colors */
    --primary-blue: var(--primary-orange);
    --primary-yellow: var(--primary-orange);
    --primary-black: var(--primary-charcoal);
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--primary-white);
    color: var(--primary-charcoal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand, .display-4, .fw-bold {
    font-family: "Montserrat", "Inter", sans-serif;
}

a { color: var(--primary-orange); }
a:hover { color: var(--primary-orange-dark); }

.btn-primary {
    background-color: var(--primary-orange) !important;
    border-color: var(--primary-orange) !important;
    color: #fff !important;
}
.btn-primary:hover {
    background-color: var(--primary-orange-dark) !important;
    border-color: var(--primary-orange-dark) !important;
}
.btn-outline-dark { border-color: var(--primary-charcoal); color: var(--primary-charcoal); }
.btn-outline-dark:hover { background-color: var(--primary-charcoal); color: #fff; }
.text-primary { color: var(--primary-orange) !important; }

/* Pre-header */
.pre-header {
    background-color: var(--primary-charcoal);
    color: var(--primary-white);
    padding: 8px 0;
    font-size: 14px;
}
.pre-header a { color: var(--primary-orange); text-decoration: none; }
.pre-header a:hover { color: var(--primary-white); }
.pre-header .ph-icon { font-size: 16px; }
.pre-header .ph-phone { white-space: nowrap; }
@media (max-width: 575.98px) {
    .pre-header { font-size: 11px; }
    .pre-header .ph-icon { font-size: 13px; }
    .pre-header .ph-text { margin-right: 0.75rem !important; }
}
@media (max-width: 359.98px) { .pre-header { font-size: 10px; } }

/* Header */
.navbar {
    background-color: var(--primary-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 12px 0;
}
.navbar-brand img { max-height: 56px; }
.nav-link { color: var(--primary-charcoal) !important; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: var(--primary-orange) !important; }

/* ---------- Hero (compact / vertical, not tall) ---------- */
.hero-section {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-color: var(--primary-charcoal);
    padding: 56px 0;
    text-align: center;
}
.hero-section h1 { font-weight: 800; letter-spacing: -0.5px; }
.hero-section .lead { color: rgba(255,255,255,0.85); }

/* ---------- Section headings ---------- */
.section-heading {
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}
.section-heading::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-orange);
    border-radius: 2px;
}

/* ---------- Category cards (homepage + store grid) ---------- */
.category-grid { --cat-gap: 1.25rem; }
.category-card {
    position: relative;
    display: block;
    border: 1px solid #ececec;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    height: 100%;
    text-decoration: none;
    color: var(--primary-charcoal);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.10);
    border-color: var(--primary-orange);
    color: var(--primary-charcoal);
}
.category-card .cat-img {
    position: relative;
    padding-top: 72%;
    overflow: hidden;
    background: #f3f3f3;
}
.category-card .cat-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.category-card:hover .cat-img img { transform: scale(1.05); }
.category-card .cat-img .cat-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #c4c4c4;
}
.category-card .cat-body {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.category-card .cat-name {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    text-transform: uppercase;
}
.category-card .cat-arrow {
    color: var(--primary-orange);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.category-card:hover .cat-arrow { transform: translateX(3px); }

/* ---------- Product cards ---------- */
.product-card {
    background: var(--primary-white);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.product-card .img-wrapper {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background-color: #fff;
    display: block;
}
.product-card .img-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 10px;
}
.product-card .card-body { padding: 18px; display: flex; flex-direction: column; flex-grow: 1; }
.product-card .product-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-charcoal);
    text-decoration: none;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .product-title:hover { color: var(--primary-orange); }

/* ---------- Inquiry / quote button (replaces checkout button) ---------- */
.btn.inquiry, .btn.checkout {
    background-color: var(--primary-orange);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background-color 0.2s;
    text-transform: uppercase;
    font-size: 14px;
    margin-top: auto;
}
.btn.inquiry:hover, .btn.checkout:hover { background-color: var(--primary-orange-dark); color: #fff; }

/* ---------- Brands carousel ---------- */
.brands-section { padding: 56px 0; background: var(--light-bg); }
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
}
.brand-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.25s, opacity 0.25s;
}
.brand-logo:hover img { filter: none; opacity: 1; }

/* ---------- Shop sidebar: nested category tree ---------- */
.shop-sidebar .widget {
    background: #fff; border: 1px solid #eee; border-radius: 8px;
    padding: 18px; margin-bottom: 24px;
}
.shop-sidebar .widget-title {
    text-transform: uppercase; font-size: 13px; letter-spacing: 1px;
    font-weight: 800; margin-bottom: 14px; color: var(--primary-charcoal);
    border-bottom: 2px solid var(--primary-orange); padding-bottom: 8px;
}
/* Mobile collapse toggle for the category filter */
.shop-sidebar .widget-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: none;
    border: 0;
    padding: 0 0 8px;
    margin: 0;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 800;
    color: var(--primary-charcoal);
    border-bottom: 2px solid var(--primary-orange);
}
.shop-sidebar .widget-toggle .toggle-chevron {
    color: var(--primary-orange);
    transition: transform 0.2s ease;
}
.shop-sidebar .widget-toggle[aria-expanded="true"] .toggle-chevron { transform: rotate(180deg); }
.shop-sidebar #categoryFilter.show { margin-top: 12px; }
.cat-tree, .cat-tree ul { list-style: none; padding: 0; margin: 0; }
.cat-tree ul { padding-left: 14px; border-left: 1px solid #eee; margin: 4px 0 4px 6px; }
.cat-tree a {
    display: flex; justify-content: space-between; align-items: center;
    color: #555; text-decoration: none;
    font-size: 13px; padding: 5px 6px; border-radius: 4px;
}
.cat-tree > li > a { text-transform: uppercase; font-weight: 700; font-size: 12px; letter-spacing: 0.4px; }
.cat-tree a:hover { background: #f4f4f4; color: var(--primary-orange); }
.cat-tree a.active { background: #fff3e9; color: var(--primary-orange); font-weight: 700; }
.cat-tree .count { color: #aaa; font-size: 11px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb-item a { color: var(--primary-grey); text-decoration: none; }
.breadcrumb-item.active { color: var(--primary-charcoal); }

/* ---------- Footer ---------- */
footer {
    background-color: var(--primary-charcoal);
    color: var(--primary-white);
    padding: 50px 0 20px;
    margin-top: auto;
}
footer h5 { color: var(--primary-orange) !important; }
footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
footer a:hover { color: var(--primary-white); }
.bottom-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px; margin-top: 30px;
    font-size: 14px; text-align: center; color: rgba(255,255,255,0.5);
}
.footer-social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8) !important;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.footer-social-icon:hover {
    background-color: var(--primary-orange);
    color: #fff !important;
    transform: translateY(-2px);
}
.footer-fb-embed { max-width: 100%; overflow: hidden; }
.footer-fb-embed iframe, .footer-fb-embed .fb-page,
.footer-fb-embed .fb-page span, .footer-fb-embed .fb-page span iframe[style] { max-width: 100% !important; }

/* ---------- Inquiry / contact form ---------- */
.inquiry-form-wrapper {
    background: #fff; padding: 30px; border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.contact-info-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.contact-info-item .material-icons { color: var(--primary-orange); }

/* Google Maps embed — responsive within its column */
.contact-map { border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.contact-map iframe { width: 100%; min-height: 300px; border: 0; display: block; }

/* ---------- Imported description / CMS content normalization ----------
   The product descriptions come from WordPress and are full of inline
   font-family/font-size styles, empty spans and unstyled tables. We
   normalize them here so they render cleanly in our typography. An author
   !important rule overrides the inline (non-important) WP styles. */
.product-description,
.page-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    overflow-x: auto;            /* let very wide tables scroll instead of breaking layout */
}
/* Kill WordPress inline font junk → inherit our site font/size */
.product-description [style],
.page-content [style],
.product-description font,
.page-content font {
    font-family: inherit !important;
}
.product-description [style*="font-size"],
.page-content [style*="font-size"] {
    font-size: inherit !important;
}
/* Drop empty spans / paragraphs left behind by the editor (&nbsp; blank lines) */
.product-description span:empty,
.product-description p:empty,
.page-content span:empty,
.page-content p:empty { display: none; }

/* Collapse long runs of <br> (WordPress editor leaves big vertical gaps) */
.product-description br + br,
.page-content br + br { display: none; }

.product-description p,
.page-content p { margin: 0 0 1rem; }

.product-description h1, .product-description h2, .product-description h3, .product-description h4,
.page-content h1, .page-content h2, .page-content h3, .page-content h4 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.6rem 0 0.75rem;
    color: var(--primary-charcoal);
}
.product-description h2, .page-content h2 { font-size: 1.35rem; }
.product-description h3, .page-content h3 { font-size: 1.15rem; }

.product-description ul, .product-description ol,
.page-content ul, .page-content ol { margin: 0 0 1rem 1.25rem; }
.product-description li, .page-content li { margin-bottom: 4px; }

/* Tables: give the WordPress spec tables proper borders + spacing */
.product-description table,
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.95rem;
}
.product-description table th, .product-description table td,
.page-content table th, .page-content table td {
    border: 1px solid #e3e3e3;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}
.product-description table th,
.page-content table th { background: #f6f6f6; font-weight: 700; }
.product-description table tr:nth-child(even) td,
.page-content table tr:nth-child(even) td { background: #fafafa; }

.product-description img { max-width: 100%; height: auto; }
.product-description img.emoji {
    display: inline !important; border: none !important; box-shadow: none !important;
    height: 1em !important; width: 1em !important; margin: 0 0.07em !important;
    vertical-align: -0.1em !important; background: none !important; padding: 0 !important;
}
.product-description svg {
    max-width: 32px; height: auto; display: inline-block;
    vertical-align: middle; margin-right: 8px;
}

/* ---------- Header search ---------- */
.header-search { width: 280px; }
.header-search .input-group {
    border: 1px solid #e3e6ea; border-radius: 6px; overflow: hidden; background: #fff;
}
.header-search .input-group-text { border: 0; background: #fff; }
.header-search .form-control { border: 0; box-shadow: none; font-size: 14px; }
.header-search .form-control:focus { box-shadow: none; }
.header-search .form-control::placeholder { color: #b0b0b0; }
@media (max-width: 991.98px) { .header-search { width: 100%; } }

/* ---------- Carousel arrows ---------- */
.carousel-control-prev, .carousel-control-next { width: 5%; color: var(--primary-charcoal); }
.carousel-control-prev-icon, .carousel-control-next-icon { filter: invert(1); }
