/* ================================================================
   DALCOL CARNES — styles.css
   Aplicado em todas as páginas de produto
================================================================ */

/* ─── VARIÁVEIS ─────────────────────────────────────────────── */
:root {
    --black:     #0d0d0d;
    --red:       #c40303;
    --red-hover: #a00202;
    --gold:      #c40303;
    --white:     #ffffff;
    --off-white: #f9f7f4;
    --gray-100:  #f3f1ee;
    --gray-200:  #e5e2dd;
    --gray-300:  #ccc8c2;
    --gray-400:  #a09890;
    --gray-600:  #6b635a;
    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --radius:    10px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
    --shadow-md: 0 6px 24px rgba(0,0,0,.12);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.16);
}

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--white);
    color: var(--black);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; }
main { flex: 1; }

/* ─── SIDEBAR OVERLAY ───────────────────────────────────────── */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.55); z-index: 9990;
    backdrop-filter: blur(3px);
}
.sidebar-overlay.active { display: block; }

/* ─── SIDEBAR ───────────────────────────────────────────────── */
.sidebar-menu {
    position: fixed; top: 0; left: -290px; width: 280px; height: 100%;
    background: var(--white); z-index: 9999; overflow-y: auto;
    transition: left .32s var(--ease);
    box-shadow: 4px 0 30px rgba(0,0,0,.18);
}
.sidebar-menu.active { left: 0; }

.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px; background: var(--black);
}
.sidebar-header span {
    font-size: .8rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: white; display: flex; align-items: center; gap: 8px;
}
.sidebar-close {
    background: none; border: none; color: white;
    font-size: 1.5rem; cursor: pointer; padding: 4px 6px;
    border-radius: 4px; transition: background .2s; line-height: 1;
}
.sidebar-close:hover { background: rgba(255,255,255,.1); }

.sidebar-links { border-bottom: 1px solid var(--gray-200); }
.sidebar-links a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; color: var(--gray-600); font-size: .9rem; font-weight: 500;
    transition: color .2s, background .2s;
}
.sidebar-links a:hover { color: var(--black); background: var(--gray-100); }
.sidebar-links a i { color: var(--red); width: 18px; text-align: center; }

.sidebar-departments { padding: 8px 0; }
.sidebar-departments-title {
    padding: 12px 20px 8px;
    font-size: .65rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--gray-400);
}

.sidebar-dept-item { border-bottom: 1px solid var(--gray-200); }
.sidebar-dept-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; font-size: .88rem; font-weight: 500; color: var(--black);
    cursor: pointer; user-select: none; transition: background .2s;
    background: none; border: none; width: 100%; text-align: left;
}
.sidebar-dept-link:hover { background: var(--gray-100); }
.dept-left { display: flex; align-items: center; gap: 12px; }
.dept-left i { color: var(--red); width: 18px; text-align: center; font-size: .88rem; }
.dept-arrow { color: var(--gray-400); font-size: .72rem; transition: transform .28s; }
.sidebar-dept-link.open .dept-arrow { transform: rotate(180deg); }

.sidebar-subdept { display: none; background: var(--gray-100); }
.sidebar-subdept.open { display: block; }
.sidebar-subdept a {
    display: block; padding: 10px 20px 10px 50px;
    font-size: .82rem; color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
    transition: color .2s, background .2s;
}
.sidebar-subdept a:hover { color: var(--red); background: white; }

/* ─── MOBILE HEADER ─────────────────────────────────────────── */
.mobile-header-bar {
    display: none; position: sticky; top: 0; z-index: 900;
    background: var(--black); align-items: center;
    justify-content: space-between; padding: 0 16px; height: 56px;
    box-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.mobile-hamburger {
    background: none; border: none; color: white;
    font-size: 1.35rem; cursor: pointer; padding: 8px;
    border-radius: 5px; transition: background .2s;
}
.mobile-hamburger:hover { background: rgba(255,255,255,.08); }
.mobile-logo { height: 34px; width: auto; }
.mobile-icons { display: flex; gap: 14px; align-items: center; }
.mobile-icons a { color: rgba(255,255,255,.75); font-size: 1.1rem; transition: color .2s; }
.mobile-icons a:hover { color: white; }

/* ─── DESKTOP HEADER ────────────────────────────────────────── */
header {
    position: sticky; top: 0; z-index: 900;
    background: var(--black); height: 68px;
    display: flex; align-items: center;
    justify-content: space-between; padding: 0 48px;
    box-shadow: 0 2px 24px rgba(0,0,0,.4);
}

.logo-container { display: flex; align-items: center; }
.logo { height: 44px; width: auto; }

nav ul { display: flex; list-style: none; gap: 2px; align-items: center; }
nav ul li { position: relative; }
nav ul li > a {
    color: rgba(255,255,255,.8); font-size: .85rem; font-weight: 500;
    letter-spacing: .03em; padding: 8px 14px; display: block; border-radius: 5px;
    transition: color .2s, background .2s; white-space: nowrap;
}
nav ul li > a:hover,
nav ul li:hover > a { color: white; background: rgba(255,255,255,.07); }

nav ul li > ul.dropdown {
    display: none; position: absolute; top: 100%; left: 0;
    background: #111; min-width: 200px; list-style: none;
    padding: 8px 0 6px; border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,.55);
    border-top: 2px solid var(--red);
}
nav ul li:hover > ul.dropdown { display: block; }
nav ul li > ul.dropdown li > a {
    padding: 9px 18px; font-size: .83rem; color: #bbb;
    display: block; border-radius: 0; font-weight: 400; transition: all .2s;
}
nav ul li > ul.dropdown li > a:hover { color: white; background: rgba(196,3,3,.15); padding-left: 24px; }

.hamburger-menu { display: none; }

/* ─── PAGE TITLE BAR ────────────────────────────────────────── */
.page-title-bar {
    background: var(--black);
    padding: 32px 48px 28px;
    border-bottom: 3px solid var(--red);
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}

.page-title-bar h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700; color: var(--white); line-height: 1.1;
}
.page-title-bar h1 em { font-style: italic; color: #c40303; }

.page-breadcrumb {
    font-size: .78rem; color: rgba(255,255,255,.4);
    display: flex; align-items: center; gap: 6px;
}
.page-breadcrumb a { color: rgba(255,255,255,.5); transition: color .2s; }
.page-breadcrumb a:hover { color: white; }
.page-breadcrumb i { font-size: .6rem; }

/* ─── BUSCA + ORDENAÇÃO ─────────────────────────────────────── */
.search-sort-bar {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 48px; background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    position: sticky; top: 68px; z-index: 50;
    backdrop-filter: blur(8px);
}

.search-input-wrapper {
    display: flex; flex: 1; min-width: 200px; max-width: 460px;
}
.search-input-wrapper input[type="text"] {
    flex: 1; padding: 10px 16px;
    border: 2px solid var(--gray-200); border-right: none;
    border-radius: 6px 0 0 6px; font-size: .9rem;
    font-family: inherit; outline: none; background: white;
    transition: border-color .2s; color: var(--black);
}
.search-input-wrapper input[type="text"]:focus { border-color: var(--black); }
.search-input-wrapper input[type="text"]::placeholder { color: var(--gray-400); }

.btn-search {
    padding: 10px 16px; background: var(--black); color: white;
    border: 2px solid var(--black); border-radius: 0 6px 6px 0;
    cursor: pointer; font-size: .95rem; transition: background .2s;
}
.btn-search:hover { background: var(--red); border-color: var(--red); }

.sort-group { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: .82rem; color: var(--gray-600); font-weight: 600; white-space: nowrap; }
.sort-select {
    padding: 10px 14px; border: 2px solid var(--gray-200);
    border-radius: 6px; font-size: .85rem; font-family: inherit;
    background: white; cursor: pointer; outline: none; color: var(--black);
    transition: border-color .2s;
}
.sort-select:focus { border-color: var(--black); }

.results-count {
    font-size: .78rem; color: var(--gray-400);
    padding: 8px 48px; background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

/* ─── PRODUTOS GRID ─────────────────────────────────────────── */
.produtos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 32px 48px 48px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.produto {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.produto:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}

.produto img {
    width: 100%; aspect-ratio: 1 / 1;
    object-fit: contain; background: var(--gray-100);
    padding: 20px;
    transition: transform .4s ease;
}
.produto:hover img { transform: scale(1.06); }

.produto-info {
    padding: 16px 18px 18px;
    display: flex; flex-direction: column; flex: 1;
    gap: 6px;
}

.produto h3 {
    font-size: .9rem; font-weight: 600; color: var(--black); line-height: 1.4;
}

.produto p {
    font-size: .78rem; color: var(--gray-400); line-height: 1.5;
}

.produto-code {
    font-size: .72rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--red);
    background: rgba(196,3,3,.07); padding: 3px 8px;
    border-radius: 4px; display: inline-block; align-self: flex-start;
}

.produto button {
    margin-top: auto; width: 100%;
    background: var(--black); color: white;
    border: none; border-radius: 6px;
    padding: 10px 16px; font-size: .82rem; font-weight: 600;
    font-family: inherit; cursor: pointer; letter-spacing: .04em;
    transition: background .25s;
}
.produto button:hover { background: var(--red); }

.produto.hidden { display: none; }

.no-results {
    display: none; text-align: center;
    padding: 80px 20px; color: var(--gray-400);
    grid-column: 1 / -1;
}
.no-results i { font-size: 2.5rem; margin-bottom: 14px; display: block; color: var(--gray-300); }
.no-results p { font-size: .95rem; }

/* ─── FOOTER ────────────────────────────────────────────────── */
footer {
    background: var(--black);
    color: white;
    padding: 48px;
    text-align: center;
    margin-top: auto;
}
footer p { font-size: .82rem; color: rgba(255,255,255,.35); }

/* ─── WHATSAPP ──────────────────────────────────────────────── */
.whatsapp-float {
    position: fixed; bottom: 26px; right: 26px;
    width: 54px; height: 54px; background: #25D366;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 22px rgba(37,211,102,.4); z-index: 9000;
    transition: transform .28s, box-shadow .28s;
}
.whatsapp-float:hover { transform: scale(1.12) translateY(-3px); box-shadow: 0 10px 30px rgba(37,211,102,.5); }
.whatsapp-float i { color: white; font-size: 1.55rem; }

/* ─── RESPONSIVE: LARGE SCREENS (1800px+) ───────────────────── */
@media (min-width: 1800px) {
    header { padding: 0 80px; height: 76px; }
    .logo { height: 52px; }
    nav ul li > a { font-size: .92rem; padding: 9px 16px; }

    .page-title-bar { padding: 40px 80px 34px; }
    .search-sort-bar { padding: 18px 80px; top: 76px; }
    .results-count { padding: 10px 80px; }

    .produtos-container {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 26px;
        padding: 40px 80px 60px;
        max-width: none;
    }

    .produto h3 { font-size: 1rem; }
    .produto p  { font-size: .84rem; }
    .produto button { font-size: .88rem; padding: 12px 18px; }

    footer { padding: 60px 80px; }
}

/* ─── RESPONSIVE: 2K / QHD (2400px+) ───────────────────────── */
@media (min-width: 2400px) {
    header { padding: 0 120px; height: 86px; }
    .logo { height: 60px; }
    nav ul li > a { font-size: 1rem; padding: 10px 18px; }
    nav ul li > ul.dropdown { min-width: 240px; }
    nav ul li > ul.dropdown li > a { font-size: .92rem; padding: 11px 22px; }

    .page-title-bar { padding: 52px 120px 44px; }
    .page-title-bar h1 { font-size: 2.8rem; }

    .search-sort-bar { padding: 22px 120px; top: 86px; }
    .search-input-wrapper input[type="text"] { font-size: 1rem; padding: 13px 20px; }
    .sort-select { font-size: .95rem; padding: 13px 18px; }
    .results-count { padding: 12px 120px; font-size: .88rem; }

    .produtos-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
        padding: 48px 120px 72px;
        max-width: none;
    }

    .produto h3 { font-size: 1.05rem; }
    .produto p  { font-size: .88rem; }
    .produto-code { font-size: .8rem; padding: 4px 10px; }
    .produto button { font-size: .92rem; padding: 13px 20px; }

    .modal-box { max-width: 1100px; }
    .modal-img-wrap { padding: 48px; }
    .modal-img-wrap img { max-height: 480px; }
    .modal-content { padding: 52px 48px 44px; gap: 22px; }
    .modal-title { font-size: 2rem; }
    .info-value { font-size: 1rem; }
    .modal-wa-btn { font-size: 1rem; padding: 16px 26px; }

    footer { padding: 72px 120px; }
    footer p { font-size: .92rem; }

    .whatsapp-float { width: 66px; height: 66px; bottom: 36px; right: 36px; }
    .whatsapp-float i { font-size: 1.9rem; }
}

/* ─── RESPONSIVE: TABLET (1024px) ───────────────────────────── */
@media (max-width: 1024px) {
    header { padding: 0 28px; }
    .page-title-bar { padding: 24px 28px 22px; }
    .search-sort-bar { padding: 14px 28px; top: 68px; }
    .results-count { padding: 8px 28px; }
    .produtos-container { padding: 28px 28px 44px; }
    nav ul li > a { padding: 8px 10px; font-size: .82rem; }
}

/* ─── RESPONSIVE: MOBILE (900px) ────────────────────────────── */
@media (max-width: 900px) {
    /* swap headers */
    header { display: none; }
    .mobile-header-bar { display: flex; }

    /* sticky offset */
    .search-sort-bar { top: 56px; }

    /* page title bar */
    .page-title-bar { padding: 22px 16px 18px; }
    .page-title-bar h1 { font-size: 1.5rem; }

    /* search sort */
    .search-sort-bar {
        flex-direction: column; align-items: stretch;
        gap: 10px; padding: 14px 16px;
    }
    .search-input-wrapper { max-width: 100%; }
    .sort-group { justify-content: flex-start; }
    .sort-select { flex: 1; }
    .results-count { padding: 6px 16px; }

    /* products grid — 2 columns */
    .produtos-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px; padding: 16px 12px 36px;
    }

    .produto img { padding: 14px; }
    .produto-info { padding: 12px 14px 14px; }
    .produto h3 { font-size: .82rem; }
    .produto p { font-size: .72rem; }
    .produto button { padding: 9px 12px; font-size: .76rem; }

    footer { padding: 32px 20px; }
}

/* ─── RESPONSIVE: SMALL MOBILE (480px) ──────────────────────── */
@media (max-width: 480px) {
    .page-title-bar h1 { font-size: 1.25rem; }
    .page-breadcrumb { display: none; }

    .produtos-container {
        grid-template-columns: 1fr 1fr;
        gap: 8px; padding: 12px 8px 28px;
    }

    .produto img { padding: 10px; }
    .produto-info { padding: 10px 10px 12px; gap: 4px; }
    .produto h3 { font-size: .78rem; }
    .produto p { font-size: .68rem; }
    .produto-code { font-size: .66rem; padding: 2px 6px; }
    .produto button { padding: 8px 10px; font-size: .72rem; }

    .search-sort-bar { padding: 12px 10px; gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL DE PRODUTO
═══════════════════════════════════════════════════════════════ */
#dalcolModal {
    display: none;
    position: fixed; inset: 0; z-index: 99999;
    align-items: center; justify-content: center;
    padding: 16px;
}
#dalcolModal.open { display: flex; }

.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(4px);
}

.modal-box {
    position: relative; z-index: 1;
    background: var(--white);
    border-radius: 14px;
    max-width: 820px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 32px 80px rgba(0,0,0,.45);
    animation: modalIn .28s cubic-bezier(0.4,0,0.2,1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.modal-close {
    position: absolute; top: 16px; right: 16px; z-index: 2;
    background: var(--gray-100); border: none; border-radius: 50%;
    width: 38px; height: 38px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-600); font-size: 1rem;
    transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--red); color: white; }

.modal-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
}

.modal-img-wrap {
    background: var(--gray-100);
    border-radius: 14px 0 0 14px;
    display: flex; align-items: center; justify-content: center;
    padding: 32px; min-height: 280px;
}
.modal-img-wrap img {
    max-width: 100%; max-height: 320px;
    object-fit: contain;
    display: block;
}

.modal-content {
    padding: 36px 32px 32px;
    display: flex; flex-direction: column; gap: 16px;
}

.modal-code {
    font-size: .72rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--white); background: var(--red);
    padding: 4px 10px; border-radius: 4px;
    align-self: flex-start;
}

.modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.2rem, 2.5vw, 1.65rem);
    font-weight: 700; line-height: 1.2; color: var(--black);
}

.modal-info-grid {
    display: flex; flex-direction: column; gap: 10px;
    border-top: 1px solid var(--gray-200);
    padding-top: 16px;
}

.modal-info-cell {
    display: flex; align-items: flex-start; gap: 12px;
}
.modal-info-cell > i {
    color: var(--red); font-size: .9rem;
    margin-top: 2px; width: 18px; text-align: center; flex-shrink: 0;
}
.info-label {
    font-size: .7rem; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--gray-400);
    line-height: 1; margin-bottom: 3px;
}
.info-value {
    font-size: .9rem; font-weight: 500; color: var(--black); line-height: 1.3;
}

.modal-no-info {
    font-size: .88rem; color: var(--gray-400); padding: 8px 0;
}

.modal-obs {
    display: flex; align-items: flex-start; gap: 10px;
    background: rgba(196,3,3,.06);
    border-left: 3px solid var(--red);
    border-radius: 0 6px 6px 0;
    padding: 12px 14px;
    font-size: .85rem; color: var(--gray-600); line-height: 1.6;
}
.modal-obs > i { color: var(--red); margin-top: 2px; flex-shrink: 0; }

.modal-wa-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: #25D366; color: white;
    font-size: .88rem; font-weight: 600; padding: 13px 20px;
    border-radius: 8px; margin-top: auto;
    transition: background .2s, transform .2s;
    align-self: flex-start;
}
.modal-wa-btn:hover { background: #1da851; transform: translateY(-2px); }
.modal-wa-btn i { font-size: 1.1rem; }

/* Modal Responsivo */
@media (max-width: 640px) {
    .modal-inner { grid-template-columns: 1fr; }
    .modal-img-wrap { border-radius: 14px 14px 0 0; min-height: 200px; padding: 24px; }
    .modal-img-wrap img { max-height: 200px; }
    .modal-content { padding: 24px 20px 28px; }
    .modal-title { font-size: 1.2rem; }
}
