/* ============================================================
   PRT - Custom stylesheet
   Bootstrap 5 base + overrides personalizzati
   ============================================================ */

/* --- Variabili colore --- */
:root {
    --prt-primary:       #1a1a2e;   /* blu notte */
    --prt-accent:        #e94560;   /* rosso accento */
    --prt-accent-dark:   #c43050;
    --prt-light-bg:      #f8f9fb;
    --prt-card-shadow:   0 2px 12px rgba(0,0,0,.08);
    --prt-card-shadow-h: 0 6px 24px rgba(0,0,0,.14);
    --prt-radius:        10px;
    --prt-transition:    .22s ease;
}

/* --- Reset base --- */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--prt-light-bg);
    color: #222;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { color: var(--prt-accent); text-decoration: none; }
a:hover { color: var(--prt-accent-dark); }

/* ============================================================
   BANNER TOP
   ============================================================ */
.prt-top-banner {
    width: 100%;
    text-align: center;
    padding: .5rem 1rem;
    font-size: .875rem;
    font-weight: 500;
    position: relative;
    z-index: 1031;
}
.prt-top-banner.alert-info    { background: #cfe2ff; color: #084298; }
.prt-top-banner.alert-success { background: #d1e7dd; color: #0a3622; }
.prt-top-banner.alert-warning { background: #fff3cd; color: #664d03; }
.prt-top-banner.alert-danger  { background: #f8d7da; color: #842029; }

/* ============================================================
   NAVBAR
   ============================================================ */
.prt-navbar {
    background: var(--prt-primary);
    padding: .6rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.prt-navbar .navbar-brand img { object-fit: contain; }
.prt-navbar .nav-link { color: rgba(255,255,255,.8) !important; font-size: .95rem; padding: .4rem .8rem; border-radius: var(--prt-radius-sm); transition: var(--prt-transition); }
.prt-navbar .nav-link:hover,
.prt-navbar .nav-link.active { color: #fff !important; background: rgba(255,255,255,.1); }
.prt-search .form-control { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: var(--prt-radius-sm) 0 0 var(--prt-radius-sm); }
.prt-search .form-control::placeholder { color: rgba(255,255,255,.5); }
.prt-search .form-control:focus { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); box-shadow: none; color: #fff; }
.prt-search .btn { border-radius: 0 var(--prt-radius-sm) var(--prt-radius-sm) 0; border-color: rgba(255,255,255,.3); color: #fff; }
.prt-search .btn:hover { background: rgba(255,255,255,.15); }

/* ============================================================
   HERO HOME
   ============================================================ */
.prt-hero {
    background: linear-gradient(135deg, var(--prt-primary) 0%, #16213e 60%, #0f3460 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    text-align: center;
}
.prt-hero h1, .prt-hero .prt-hero-titolo { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.5px; color:#fff; }
.prt-hero p, .prt-hero .prt-hero-sottotitolo  { font-size: 1.1rem; opacity: .8; max-width: 520px; margin: 1rem auto 0; color:#fff; }
.prt-hero .btn-accent {
    background: var(--prt-accent);
    color: #fff;
    border: none;
    padding: .75rem 2rem;
    border-radius: var(--prt-radius-pill);
    font-weight: 600;
    transition: var(--prt-transition);
    margin-top: 2rem;
}
.prt-hero .btn-accent:hover { background: var(--prt-accent-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233,69,96,.4); }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.prt-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--prt-primary);
    position: relative;
    padding-bottom: .5rem;
    margin-bottom: 1.5rem;
}
.prt-section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: var(--prt-accent);
    border-radius: 2px;
}

/* ============================================================
   CARD CATEGORIA (homepage)
   ============================================================ */
.prt-brand-card {
    background: #fff;
    border-radius: var(--prt-radius);
    box-shadow: var(--prt-card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--prt-transition), transform var(--prt-transition);
    height: 100%;
}
.prt-brand-card:hover { box-shadow: var(--prt-card-shadow-h); transform: translateY(-4px); }
.prt-brand-card-img {
    width: 100%; height: 210px;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    padding: .5rem;
    border-bottom: 1px solid #f0f0f0;
}
.prt-brand-card-img img { max-width: 95%; max-height: 200px; object-fit: contain; }
.prt-brand-card-body { padding: 1.1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.prt-brand-card-body h3 { font-size: 1rem; font-weight: 700; color: var(--prt-primary); margin-bottom: .4rem; }
.prt-brand-card-body p  { font-size: .875rem; color: #666; flex: 1; }
.btn-prt {
    display: inline-block;
    background: var(--prt-accent);
    color: #fff !important;
    padding: .45rem 1.2rem;
    border-radius: var(--prt-radius-pill);
    font-size: .85rem;
    font-weight: 600;
    transition: var(--prt-transition);
    border: none;
}
.btn-prt:hover { background: var(--prt-accent-dark); transform: translateY(-1px); }

/* ============================================================
   GRIGLIA PRODOTTI
   ============================================================ */
.prt-product-card {
    background: #fff;
    border-radius: var(--prt-radius);
    box-shadow: var(--prt-card-shadow);
    overflow: hidden;
    transition: box-shadow var(--prt-transition), transform var(--prt-transition);
    display: flex; flex-direction: column;
    height: 100%;
}
.prt-product-card:hover { box-shadow: var(--prt-card-shadow-h); transform: translateY(-4px); }
.prt-product-img-wrap {
    width: 100%; height: 220px;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px;
}
.prt-product-img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center center;
    transition: transform .3s ease;
    display: block;
    margin: auto;
}
.prt-product-card:hover .prt-product-img { transform: scale(1.04); }
.prt-product-body { padding: 1rem 1.1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.prt-product-code { font-size: .75rem; font-weight: 700; color: var(--prt-accent); letter-spacing: .5px; text-transform: uppercase; margin-bottom: .25rem; }
.prt-product-name { font-size: .9rem; font-weight: 600; color: #222; flex: 1; margin-bottom: .75rem; line-height: 1.35; }
.prt-product-card .btn-prt { align-self: flex-start; font-size: .8rem; }

/* --- Paginazione --- */
.prt-pagination .page-link { border-radius: var(--prt-radius-sm) !important; margin: 0 2px; color: var(--prt-primary); border: 1px solid #dee2e6; }
.prt-pagination .page-item.active .page-link { background: var(--prt-accent); border-color: var(--prt-accent); color: #fff; }
.prt-pagination .page-link:hover { background: var(--prt-primary); color: #fff; border-color: var(--prt-primary); }

/* ============================================================
   PAGINA PRODOTTO SINGOLO
   ============================================================ */
.prt-product-detail {}
.prt-gallery-main {
    background: #fff;
    border-radius: var(--prt-radius);
    box-shadow: var(--prt-card-shadow);
    display: flex; align-items: center; justify-content: center;
    min-height: 340px;
    padding: 1.5rem;
    overflow: hidden;
}
.prt-gallery-main img { max-width: 100%; max-height: 320px; object-fit: contain; }
.prt-gallery-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.prt-gallery-thumbs a { display: block; width: 64px; height: 64px; background: #fff; border-radius: var(--prt-radius-sm); border: 2px solid transparent; overflow: hidden; transition: border-color var(--prt-transition); }
.prt-gallery-thumbs a:hover, .prt-gallery-thumbs a.active { border-color: var(--prt-accent); }
.prt-gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.prt-detail-info { background: #fff; border-radius: var(--prt-radius); box-shadow: var(--prt-card-shadow); padding: 2rem; }
.prt-detail-info h1 { font-size: 1.6rem; font-weight: 700; color: var(--prt-primary); }
.prt-detail-info .prt-product-code { font-size: .85rem; }
.prt-detail-specs { margin-top: 1.25rem; }
.prt-detail-specs .spec-row { display: flex; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid #f0f0f0; font-size: .9rem; }
.prt-detail-specs .spec-label { font-weight: 600; color: #555; min-width: 140px; }
.prt-detail-specs .spec-val { color: #222; }

/* Tabella prezzi */
.prt-price-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--prt-radius); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-top: 1rem; }
.prt-price-table th { background: var(--prt-primary); color: #fff; padding: .6rem .9rem; font-size: .85rem; font-weight: 600; text-align: center; }
.prt-price-table td { background: #fff; padding: .55rem .9rem; font-size: .9rem; text-align: center; border-bottom: 1px solid #f0f0f0; }
.prt-price-table tr:last-child td { border-bottom: none; }
.prt-price-table .price-val { font-weight: 700; color: var(--prt-accent); }

/* Tabella disponibilita */
.prt-avail-table { width: 100%; border-radius: var(--prt-radius); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.prt-avail-table th { background: var(--prt-primary); color: #fff; padding: .5rem .75rem; font-size: .82rem; }
.prt-avail-table td { background: #fff; padding: .45rem .75rem; font-size: .85rem; border-bottom: 1px solid #f5f5f5; }
.prt-avail-table tr:last-child td { border-bottom: none; }
.prt-avail-section-head { background: #f0f4ff !important; font-weight: 700; color: var(--prt-primary) !important; }
.prt-avail-arrival { background: #fff8f0 !important; font-weight: 700; color: #9a5800 !important; }

/* Badge colore disponibilita */
.prt-color-swatch { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 1px solid #ccc; vertical-align: middle; }

/* ============================================================
   PAGINA CONTATTI
   ============================================================ */
.prt-contact-card {
    background: #fff;
    border-radius: var(--prt-radius);
    box-shadow: var(--prt-card-shadow);
    padding: 2rem;
    height: 100%;
}
.prt-contact-icon { font-size: 2.2rem; color: var(--prt-accent); margin-bottom: .75rem; }
.prt-contact-card h3 { font-size: 1rem; font-weight: 700; color: var(--prt-primary); margin-bottom: .35rem; }
.prt-contact-card a { color: #444; }
.prt-contact-card a:hover { color: var(--prt-accent); }
.prt-map-wrap { border-radius: var(--prt-radius); overflow: hidden; box-shadow: var(--prt-card-shadow); }
.prt-map-wrap iframe { display: block; width: 100%; border: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.prt-footer { margin-top: auto; }
.prt-footer-cta { background: var(--prt-primary); padding: 2.5rem 0; }
.prt-footer-icon { font-size: 1.6rem; color: var(--prt-accent); flex-shrink: 0; }
.prt-footer-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.5); margin-bottom: .15rem; }
.prt-footer-link { color: rgba(255,255,255,.85); font-weight: 500; font-size: .95rem; }
.prt-footer-link:hover { color: #fff; }
.prt-footer-bottom { background: #111; color: rgba(255,255,255,.5); padding: 1.1rem 0; font-size: .82rem; }
.prt-footer-bottom strong { color: rgba(255,255,255,.8); }
.prt-back-top { color: rgba(255,255,255,.5); transition: color var(--prt-transition); }
.prt-back-top:hover { color: var(--prt-accent); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.prt-breadcrumb { background: none; padding: .6rem 0 0; font-size: .82rem; }
.prt-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #bbb; }
.prt-breadcrumb a { color: #777; }
.prt-breadcrumb a:hover { color: var(--prt-accent); }

/* ============================================================
   UTILITY
   ============================================================ */
.prt-page-title { font-size: 1.6rem; font-weight: 700; color: var(--prt-primary); }
.main-content { padding-top: 2rem; padding-bottom: 3rem; flex: 1; }

/* risultati ricerca / conteggio */
.prt-results-bar { font-size: .85rem; color: #666; }

/* Card "nessun prodotto trovato" */
.prt-empty { text-align: center; padding: 4rem 2rem; color: #aaa; }
.prt-empty i { font-size: 3.5rem; display: block; margin-bottom: 1rem; }

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 767px) {
    .prt-footer-location { display: none !important; }
}
@media (max-width: 576px) {
    .prt-hero { padding: 3rem 0 2.5rem; }
    .prt-hero h1 { font-size: 1.6rem; }
    .prt-gallery-main { min-height: 220px; }
}

/* ============================================================
   BARRA FILTRI
   ============================================================ */
.prt-filter-bar {
    background: #fff;
    border-radius: var(--prt-radius);
    box-shadow: var(--prt-card-shadow);
    padding: .9rem 1.1rem;
}
.prt-filter-group { display: flex; flex-direction: column; gap: .25rem; min-width: 140px; }
.prt-filter-label { font-size: .75rem; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: .4px; }
.prt-filter-select, .prt-filter-input {
    border-radius: var(--prt-radius-sm) !important;
    border-color: #dee2e6;
    font-size: .85rem;
}
.prt-filter-select:focus, .prt-filter-input:focus {
    border-color: var(--prt-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--prt-accent) 20%, transparent);
}
@media (max-width: 576px) {
    .prt-filter-group { min-width: calc(50% - .5rem); }
    .prt-filter-bar form { gap: .5rem; }
}

/* ============================================================
   VARIABILI RADIUS (override sharp via :root in header)
   ============================================================ */
:root {
    --prt-radius-pill: 50px;
    --prt-radius-lg:   16px;
    --prt-radius-sm:   6px;
}

/* ============================================================
   VISTA LISTA PRODOTTI
   ============================================================ */
.prt-list-view {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.prt-list-row {
    background: #fff;
    border-radius: var(--prt-radius);
    box-shadow: var(--prt-card-shadow);
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: .75rem 1rem;
    transition: box-shadow var(--prt-transition), transform var(--prt-transition);
    border: 1px solid rgba(0,0,0,.045);
}
.prt-list-row:hover {
    box-shadow: var(--prt-card-shadow-h);
    transform: translateX(3px);
}
.prt-list-img-wrap {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    overflow: hidden;
    border-radius: var(--prt-radius-sm);
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prt-list-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.prt-list-body {
    flex: 1;
    min-width: 0;
}
.prt-list-name {
    font-weight: 600;
    font-size: .95rem;
    color: #1a1a2e;
    margin-bottom: .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prt-list-desc {
    font-size: .8rem;
    color: #777;
    line-height: 1.4;
}
.prt-list-action {
    flex-shrink: 0;
}
@media (max-width: 576px) {
    .prt-list-img-wrap { width: 62px; height: 62px; }
    .prt-list-desc { display: none; }
    .prt-list-name { font-size: .85rem; }
}

/* ============================================================
   PILL RADIUS per bottoni hero e btn-prt quando rounded
   ============================================================ */
.btn-prt {
    border-radius: var(--prt-radius-pill);
}
.prt-hero .btn-accent {
    border-radius: var(--prt-radius-pill);
}
.prt-pagination .page-link {
    border-radius: var(--prt-radius-sm) !important;
}

/* ============================================================
   DARK MODE
   ============================================================ */
body.prt-dark {
    background: #0f1117 !important;
    color: #d8dce8 !important;
}
body.prt-dark .prt-filter-bar,
body.prt-dark .prt-filter-select,
body.prt-dark .prt-filter-input {
    background: #1c1f2b !important;
    border-color: #2e3347 !important;
    color: #d8dce8 !important;
}
body.prt-dark .prt-filter-label { color: #8b94b8 !important; }
body.prt-dark .prt-product-card,
body.prt-dark .prt-list-row {
    background: #1c1f2b !important;
    border-color: #2e3347 !important;
}
body.prt-dark .prt-product-card:hover,
body.prt-dark .prt-list-row:hover { background: #242840 !important; }
body.prt-dark .prt-product-name,
body.prt-dark .prt-list-name { color: #c5cbe8 !important; }
body.prt-dark .prt-product-code { color: #6b7580 !important; }
body.prt-dark .prt-list-desc { color: #606882 !important; }
body.prt-dark .prt-section-title { color: #c5cbe8 !important; }
body.prt-dark .prt-brand-card { background: #1c1f2b !important; }
body.prt-dark .prt-brand-card-body { background: #1c1f2b !important; }
body.prt-dark .prt-brand-name { color: #c5cbe8 !important; }
body.prt-dark .prt-hero {
    background: linear-gradient(135deg, #080912 0%, #0b1422 60%, #081830 100%) !important;
}
body.prt-dark .prt-footer-cta { background: #111420 !important; }
body.prt-dark .prt-footer-bottom { background: #080a10 !important; }
body.prt-dark .prt-footer-link { color: #7b8db8 !important; }
body.prt-dark .prt-footer-label { color: #4a5578 !important; }
body.prt-dark .breadcrumb-item,
body.prt-dark .breadcrumb-item a { color: #6b7580 !important; }
body.prt-dark .breadcrumb-item.active { color: #9ba3c0 !important; }
body.prt-dark .prt-spec-table td,
body.prt-dark .prt-spec-table th { border-color: #2e3347 !important; }
body.prt-dark .prt-spec-table { background: #1c1f2b !important; color: #d8dce8 !important; }
body.prt-dark .prt-gallery-thumb { background: #1c1f2b !important; border-color: #2e3347 !important; }
