/* =============================================================
   Pandabox B2B – Stylesheet principale
   Design ispirato ad Amazon | Bootstrap 5 override + custom
   ============================================================= */

/* ---------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
--------------------------------------------------------------- */
:root {
    /* Colori brand */
    --pb-dark:          #131921;   /* Header / Footer */
    --pb-dark2:         #232F3E;   /* Cat bar / Secondary bg */
    --pb-dark3:         #37475A;   /* Hover su dark */
    --pb-orange:        #FF9900;   /* Accent primario */
    --pb-orange-h:      #F3A847;   /* Hover su orange */
    --pb-orange-dark:   #CC7700;   /* Active su orange */

    /* UI */
    --pb-bg:            #EAEDED;   /* Background pagina */
    --pb-white:         #FFFFFF;
    --pb-text:          #0F1111;
    --pb-text-muted:    #565959;
    --pb-link:          #007185;
    --pb-link-h:        #C7511F;
    --pb-border:        #D5D9D9;
    --pb-border-light:  #E3E6E6;
    --pb-success:       #007600;
    --pb-danger:        #B12704;
    --pb-warning:       #FF9900;
    --pb-info:          #007185;

    /* Tipografia */
    --pb-font:          'Manrope', 'Segoe UI', sans-serif;
    --pb-font-size:     14px;
    --pb-line-height:   1.5;

    /* Spacing & Shape */
    --pb-radius:        8px;
    --pb-radius-sm:     4px;
    --pb-radius-lg:     12px;
    --pb-shadow:        0 2px 8px rgba(0,0,0,.12);
    --pb-shadow-h:      0 4px 20px rgba(0,0,0,.22);
    --pb-transition:    .18s ease;

    /* Topbar */
    --pb-topbar-h:      30px;
    /* Header */
    --pb-header-h:      58px;
    /* Catbar */
    --pb-catbar-h:      36px;
}

/* ---------------------------------------------------------------
   2. Reset & Base
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: var(--pb-font-size);
}

body {
    font-family: var(--pb-font);
    background: var(--pb-bg);
    color: var(--pb-text);
    line-height: var(--pb-line-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-xxl {
    max-width: 1360px;
}

.pb-page-shell {
    padding-top: 14px;
    padding-bottom: 14px;
}

a { color: var(--pb-link); }
a:hover { color: var(--pb-link-h); }
img { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------
   3. Top Bar
--------------------------------------------------------------- */
.pb-topbar {
    background: var(--pb-dark2);
    color: rgba(255,255,255,.75);
    min-height: var(--pb-topbar-h);
    padding: 3px 0;
    font-size: 12px;
}

.pb-topbar-compact {
    min-height: 24px;
    padding: 1px 0;
    font-size: 11px;
}

/* ---------------------------------------------------------------
   4. Language Switcher
--------------------------------------------------------------- */
.pb-lang-switcher { font-size: 12px; gap: 4px; }
.pb-lang-link {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: var(--pb-radius-sm);
    border: 1px solid transparent;
    transition: var(--pb-transition);
}
.pb-lang-link:hover {
    color: #fff;
    border-color: rgba(255,255,255,.4);
}

.pb-lang-active {
    color: var(--pb-orange);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--pb-radius-sm);
    border: 1px solid var(--pb-orange);
}

/* ---------------------------------------------------------------
   5. Header
--------------------------------------------------------------- */
.pb-header {
    background: var(--pb-dark);
    color: #fff;
    min-height: var(--pb-header-h);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.pb-header-row {
    min-height: var(--pb-header-h);
}

.pb-header-row-compact {
    min-height: 42px;
    gap: 6px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

/* Logo */
.pb-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pb-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 1px 5px rgba(0,0,0,.24);
}

.pb-header-logo-compact .pb-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.pb-header-logo-compact .pb-logo-text {
    font-size: 18px;
}

.pb-logo-stack {
    display: flex;
    flex-direction: column;
}

.pb-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1;
}
.pb-logo-accent { color: var(--pb-orange); }
.pb-logo-sub {
    font-size: 10px;
    color: rgba(255,255,255,.6);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
}

/* Search */
.pb-search-form { max-width: 700px; }

.pb-search-wrap {
    min-width: 280px;
}

.pb-search-wrap-compact {
    max-width: 460px;
}

.pb-search-group-compact {
    box-shadow: 0 1px 3px rgba(0,0,0,.14);
    border-radius: 7px;
    overflow: hidden;
}

.pb-search-select {
    background: #f3f3f3;
    border: none;
    border-radius: var(--pb-radius-sm) 0 0 var(--pb-radius-sm);
    font-size: 12px;
    color: var(--pb-text);
    max-width: 140px;
    cursor: pointer;
}
.pb-search-select:focus { box-shadow: none; border-color: var(--pb-orange); }

.pb-search-select-compact {
    max-width: 96px;
    font-size: 11px;
    padding-top: 0;
    padding-bottom: 0;
}

.pb-search-input {
    border: none;
    font-size: 14px;
    color: var(--pb-text);
    border-radius: 0;
}
.pb-search-input:focus { box-shadow: none; outline: 2px solid var(--pb-orange); }

.pb-search-input-compact {
    min-height: 34px;
    font-size: 12px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.pb-search-btn {
    background: var(--pb-orange);
    border: none;
    color: var(--pb-dark);
    padding: 0 18px;
    border-radius: 0 var(--pb-radius-sm) var(--pb-radius-sm) 0;
    transition: background var(--pb-transition);
}
.pb-search-btn:hover { background: var(--pb-orange-h); }
.pb-search-btn:active { background: var(--pb-orange-dark); }

.pb-search-btn-compact {
    min-height: 34px;
    padding-left: 11px;
    padding-right: 11px;
}

/* Header Buttons */
.pb-header-btn {
    color: #fff;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--pb-radius-sm);
    padding: 6px 9px;
    font-size: 13px;
    transition: border-color var(--pb-transition), background var(--pb-transition);
    white-space: nowrap;
}
.pb-header-btn:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255,255,255,.08);
}

.pb-header-btn-compact {
    min-height: 34px;
    padding: 4px 7px;
    font-size: 12px;
}

.pb-header-btn-primary {
    background: var(--pb-orange);
    color: var(--pb-dark);
    border: 1px solid var(--pb-orange);
    border-radius: var(--pb-radius-sm);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    transition: background var(--pb-transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.pb-header-btn-primary:hover { background: var(--pb-orange-h); color: var(--pb-dark); }

.pb-header-actions-compact {
    gap: 3px !important;
}

.pb-cart-btn-compact {
    min-width: 40px;
    justify-content: center;
}

.pb-header-logo-compact {
    gap: 8px;
    margin-right: 2px !important;
}

.pb-logo-sub-compact {
    display: none !important;
}

.pb-topbar-compact-note {
    opacity: .8;
}

/* Cart Badge */
.pb-cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(30%, -30%);
    background: var(--pb-orange);
    color: var(--pb-dark);
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ---------------------------------------------------------------
   6. Category Bar
--------------------------------------------------------------- */
.pb-catbar {
    background: var(--pb-dark2);
    border-bottom: 2px solid rgba(255,255,255,.05);
    min-height: var(--pb-catbar-h);
}

.pb-catbar-compact {
    min-height: 30px;
    border-bottom-width: 1px;
}

.pb-catbar-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
    gap: 2px !important;
}
.pb-catbar-scroll::-webkit-scrollbar { display: none; }

.pb-catbar-link {
    color: rgba(255,255,255,.88);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--pb-radius-sm);
    white-space: nowrap;
    transition: background var(--pb-transition), color var(--pb-transition);
    flex-shrink: 0;
    display: inline-block;
}
.pb-catbar-link:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.pb-catbar-link.active {
    background: var(--pb-orange);
    color: var(--pb-dark);
    font-weight: 600;
}

.pb-catbar-compact .pb-catbar-scroll {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.pb-catbar-compact .pb-catbar-link {
    font-size: 12px;
    padding: 4px 8px;
}

/* ---------------------------------------------------------------
   7. Main Content
--------------------------------------------------------------- */
.pb-main { flex: 1 1 auto; }

/* ---------------------------------------------------------------
   8. Sezioni comuni
--------------------------------------------------------------- */
.pb-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--pb-text);
    position: relative;
    padding-bottom: 10px;
}
.pb-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--pb-orange);
    border-radius: 2px;
}
.pb-section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ---------------------------------------------------------------
   9. Hero Section
--------------------------------------------------------------- */
.pb-hero {
    background: linear-gradient(135deg, var(--pb-dark) 0%, var(--pb-dark2) 60%, #1a3a4a 100%);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.pb-badge-b2b {
    background: rgba(255,153,0,.15);
    color: var(--pb-orange);
    border: 1px solid var(--pb-orange);
    font-size: 12px;
    padding: 4px 10px;
    letter-spacing: .5px;
}

.pb-hero-title {
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

.pb-hero-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,.75);
    max-width: 520px;
    line-height: 1.6;
}

.pb-trust-badges {
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

.pb-btn-hero-primary {
    background: var(--pb-orange);
    color: var(--pb-dark);
    border: 2px solid var(--pb-orange);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: var(--pb-radius);
    font-size: 15px;
    transition: background var(--pb-transition), transform var(--pb-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.pb-btn-hero-primary:hover {
    background: var(--pb-orange-h);
    color: var(--pb-dark);
    transform: translateY(-1px);
}

.pb-btn-hero-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.6);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--pb-radius);
    font-size: 15px;
    transition: border-color var(--pb-transition), background var(--pb-transition);
    text-decoration: none;
}
.pb-btn-hero-secondary:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
    color: #fff;
}

/* Hero Illustration */
.pb-hero-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.pb-hero-box {
    width: min(360px, 100%);
    background: rgba(255,153,0,.04);
    border: 1px solid rgba(255,153,0,.28);
    border-radius: var(--pb-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: pb-float 4s ease-in-out infinite;
}

.pb-hero-panda-art {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
}
@keyframes pb-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---------------------------------------------------------------
   10. Category Cards
--------------------------------------------------------------- */
.pb-cat-card {
    background: var(--pb-white);
    border: 1px solid var(--pb-border-light);
    border-radius: var(--pb-radius);
    color: var(--pb-text);
    transition: box-shadow var(--pb-transition), border-color var(--pb-transition), transform var(--pb-transition);
}
.pb-cat-card:hover {
    box-shadow: var(--pb-shadow-h);
    border-color: var(--pb-orange);
    transform: translateY(-2px);
    color: var(--pb-text);
}
.pb-cat-icon {
    font-size: 32px;
    color: var(--pb-orange);
}
.pb-cat-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--pb-text);
}

/* ---------------------------------------------------------------
   11. Benefit Cards
--------------------------------------------------------------- */
.pb-benefits-section { background: var(--pb-bg); }

.pb-benefit-card {
    background: var(--pb-white);
    border: 1px solid var(--pb-border-light);
    border-radius: var(--pb-radius-lg);
    box-shadow: var(--pb-shadow);
    transition: box-shadow var(--pb-transition), transform var(--pb-transition);
}
.pb-benefit-card:hover {
    box-shadow: var(--pb-shadow-h);
    transform: translateY(-3px);
}
.pb-benefit-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,153,0,.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 28px;
    color: var(--pb-orange);
}
.pb-benefit-title { font-size: 18px; font-weight: 700; color: var(--pb-text); }
.pb-benefit-desc { font-size: 14px; color: var(--pb-text-muted); line-height: 1.6; }

/* ---------------------------------------------------------------
   12. Product Cards
--------------------------------------------------------------- */
.pb-product-card {
    background: var(--pb-white);
    border: 1px solid var(--pb-border-light);
    border-radius: var(--pb-radius);
    overflow: hidden;
    transition: box-shadow var(--pb-transition), transform var(--pb-transition), border-color var(--pb-transition);
    display: flex;
    flex-direction: column;
}
.pb-product-card:hover {
    box-shadow: var(--pb-shadow-h);
    transform: translateY(-2px);
    border-color: #cfd5d5;
}

.pb-product-img-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--pb-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.pb-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.pb-product-card:hover .pb-product-img { transform: scale(1.04); }

.pb-product-media-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(19,25,33,.82);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
}

.pb-product-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--pb-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pb-border);
    font-size: 40px;
}

.pb-product-body { flex: 1; }
.pb-product-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pb-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
    line-height: 1.4;
}
.pb-product-desc {
    font-size: 12px;
    color: var(--pb-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.pb-product-footer { border-top: 1px solid var(--pb-border-light); }
.pb-product-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--pb-danger);
}

.pb-product-detail-img {
    width: 100%;
    object-fit: contain;
    max-height: 420px;
}

.pb-product-detail-gallery {
    display: flex;
    flex-direction: column;
}

.pb-product-thumb-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
}

.pb-product-thumb {
    border: 1px solid var(--pb-border-light);
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    transition: border-color var(--pb-transition), box-shadow var(--pb-transition);
}

.pb-product-thumb.active,
.pb-product-thumb:hover {
    border-color: var(--pb-orange);
    box-shadow: 0 0 0 2px rgba(255,153,0,.14);
}

.pb-product-thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.pb-share-card {
    border: 1px solid var(--pb-border-light);
    border-radius: var(--pb-radius);
    background: #fcfdfd;
    padding: 14px;
}

.pb-share-card-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.pb-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pb-product-detail-placeholder {
    height: 360px;
    background: var(--pb-bg);
    color: var(--pb-border);
    font-size: 80px;
}

.pb-product-price-block {
    background: var(--pb-bg);
    display: inline-block;
    min-width: 200px;
}

.pb-product-price-xl {
    font-size: 28px;
}

.pb-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    overflow: hidden;
}

.pb-qty-control .btn {
    border: 0;
}

.pb-qty-input-compact {
    width: 60px;
    box-shadow: none;
}

/* Stock Badges */
.pb-badge-stock {
    background: #e7f4e4;
    color: var(--pb-success);
    font-size: 11px;
    border: 1px solid #c3e6bc;
}
.pb-badge-outofstock {
    background: #fce8e6;
    color: var(--pb-danger);
    font-size: 11px;
    border: 1px solid #f5c6c0;
}

/* Add to Cart Button */
.pb-btn-add-cart {
    background: var(--pb-orange);
    color: var(--pb-dark);
    border: 1px solid var(--pb-orange);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--pb-radius-sm);
    transition: background var(--pb-transition);
}
.pb-btn-add-cart:hover { background: var(--pb-orange-h); color: var(--pb-dark); border-color: var(--pb-orange-h); }

/* ---------------------------------------------------------------
   13. CTA Section
--------------------------------------------------------------- */
.pb-cta-section {
    background: linear-gradient(135deg, var(--pb-dark) 0%, var(--pb-dark2) 100%);
    color: #fff;
}
.pb-cta-title { font-size: 30px; font-weight: 800; color: #fff; }
.pb-cta-desc { font-size: 16px; color: rgba(255,255,255,.75); max-width: 500px; margin: 0 auto; }
.pb-btn-cta {
    background: var(--pb-orange);
    color: var(--pb-dark);
    border: none;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: var(--pb-radius);
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background var(--pb-transition), transform var(--pb-transition);
}
.pb-btn-cta:hover { background: var(--pb-orange-h); color: var(--pb-dark); transform: translateY(-2px); }

/* ---------------------------------------------------------------
   14. Forms
--------------------------------------------------------------- */
.pb-form-card {
    background: var(--pb-white);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-lg);
    box-shadow: var(--pb-shadow);
}
.pb-form-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--pb-text);
}

.pb-page-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pb-eyebrow {
    color: var(--pb-link);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
    font-weight: 700;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--pb-orange);
    box-shadow: 0 0 0 3px rgba(255,153,0,.15);
}

.pb-form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--pb-text);
    margin-bottom: 4px;
}

/* Password strength indicator */
.pb-pw-strength { height: 4px; border-radius: 2px; transition: width .3s ease, background .3s ease; }
.pb-pw-weak    { background: var(--pb-danger); width: 33%; }
.pb-pw-medium  { background: var(--pb-warning); width: 66%; }
.pb-pw-strong  { background: var(--pb-success); width: 100%; }

/* ---------------------------------------------------------------
   15. Buttons (globali)
--------------------------------------------------------------- */
.btn-pb-primary {
    background: var(--pb-orange);
    color: var(--pb-dark);
    border-color: var(--pb-orange);
    font-weight: 600;
}
.btn-pb-primary:hover { background: var(--pb-orange-h); border-color: var(--pb-orange-h); color: var(--pb-dark); }

/* ---------------------------------------------------------------
   16. Cart / Checkout
--------------------------------------------------------------- */
.pb-cart-table th { background: var(--pb-bg); font-size: 13px; font-weight: 700; }
.pb-cart-table td { vertical-align: middle; font-size: 13px; }
.pb-cart-qty-input { width: 70px; text-align: center; }
.pb-cart-total-row { font-size: 18px; font-weight: 700; }

.pb-cart-panel {
    border-color: var(--pb-border-light) !important;
}

.pb-cart-row td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.pb-cart-product-name {
    font-weight: 700;
    color: var(--pb-text);
    line-height: 1.35;
}

.pb-cart-product-name:hover {
    color: var(--pb-link);
}

.pb-cart-mobile-label {
    display: none;
    font-size: 11px;
    font-weight: 700;
    color: var(--pb-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.pb-cart-remove-btn {
    line-height: 1;
}

.pb-cart-summary-card {
    position: sticky;
    top: 96px;
}

.pb-cart-summary-line {
    color: var(--pb-text-muted);
}

.pb-cart-actions {
    background: #fcfdfd;
}

.pb-cart-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.pb-cart-thumb-placeholder {
    width: 48px;
    height: 48px;
    background: var(--pb-bg);
    color: var(--pb-border);
    font-size: 22px;
}

.pb-cart-summary {
    padding: 16px;
}

.pb-delivery-card {
    border: 2px solid var(--pb-border);
    border-radius: var(--pb-radius);
    padding: 16px;
    cursor: pointer;
    transition: border-color var(--pb-transition), background var(--pb-transition);
}
.pb-delivery-card:hover,
.pb-delivery-card.selected {
    border-color: var(--pb-orange);
    background: rgba(255,153,0,.06);
}

/* ---------------------------------------------------------------
   17. Admin Panel
--------------------------------------------------------------- */
.pb-admin-sidebar {
    background: var(--pb-dark);
    min-height: calc(100vh - var(--pb-topbar-h));
    width: 240px;
    flex-shrink: 0;
}
.pb-admin-sidebar .nav-link {
    color: rgba(255,255,255,.75);
    padding: 10px 20px;
    border-radius: var(--pb-radius-sm);
    font-size: 14px;
    transition: background var(--pb-transition), color var(--pb-transition);
}
.pb-admin-sidebar .nav-link:hover,
.pb-admin-sidebar .nav-link.active {
    background: rgba(255,255,255,.1);
    color: var(--pb-orange);
}
.pb-admin-sidebar .nav-link i { width: 20px; text-align: center; }

.pb-admin-topbar {
    background: var(--pb-white);
    border-bottom: 1px solid var(--pb-border);
    padding: 12px 20px;
    font-size: 14px;
}

.pb-stat-card {
    background: var(--pb-white);
    border: 1px solid var(--pb-border-light);
    border-radius: var(--pb-radius);
    padding: 20px;
    border-left: 4px solid var(--pb-orange);
}
.pb-stat-number { font-size: 32px; font-weight: 800; color: var(--pb-text); line-height: 1; }
.pb-stat-label  { font-size: 13px; color: var(--pb-text-muted); margin-top: 4px; }

/* AI Help button */
.pb-btn-ai {
    background: linear-gradient(135deg, #6f42c1, #0d6efd);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--pb-radius-sm);
    padding: 6px 14px;
    transition: opacity var(--pb-transition);
}
.pb-btn-ai:hover { opacity: .88; color: #fff; }
.pb-btn-ai:disabled { opacity: .6; }

.pb-admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 12px;
}

.pb-admin-gallery-item {
    display: block;
    padding: 10px;
    background: #fbfcfc;
    border: 1px solid var(--pb-border-light);
    border-radius: 12px;
    cursor: move;
}

.pb-admin-gallery-item.is-dragging {
    opacity: .55;
}

.pb-admin-gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--pb-border-light);
}

.pb-admin-gallery-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pb-text-muted);
    margin-bottom: 8px;
    font-size: 16px;
}

.pb-admin-gallery-meta .form-check-input {
    margin-top: 0;
}

.pb-admin-gallery-meta .form-control {
    max-width: 84px;
}

/* ---------------------------------------------------------------
   18. Footer
--------------------------------------------------------------- */
.pb-footer { background: var(--pb-dark); color: rgba(255,255,255,.8); margin-top: auto; }
.pb-footer-top { border-bottom: 1px solid rgba(255,255,255,.08); }
.pb-footer-bottom { background: rgba(0,0,0,.2); }

.pb-footer-heading {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
}
.pb-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pb-footer-list li { margin-bottom: 6px; }
.pb-footer-list a {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--pb-transition);
}
.pb-footer-list a:hover { color: var(--pb-orange); }

/* ---------------------------------------------------------------
   19. Catalog / Pagination
--------------------------------------------------------------- */
.pb-catalog-filters {
    background: var(--pb-white);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius);
    padding: 12px;
}

.pb-catalog-filters-wrap {
    top: 88px;
}

.pb-filter-link {
    display: block;
    padding: 5px 8px;
    color: var(--pb-text-muted);
    text-decoration: none;
    font-size: 12.5px;
    border-radius: var(--pb-radius-sm);
    transition: background .15s, color .15s;
    margin-bottom: 2px;
}

.pb-filter-link:hover {
    background: var(--pb-bg);
    color: var(--pb-text);
}

.pb-filter-link.active {
    background: rgba(255,153,0,.12);
    color: var(--pb-orange);
    font-weight: 600;
}

.pb-catalog-sort {
    min-width: 170px;
}

.pb-account-sidebar {
    border-color: var(--pb-border-light);
}

.pb-account-user {
    padding-top: 4px;
}

.pb-account-avatar {
    width: 64px;
    height: 64px;
    font-size: 26px;
    background: linear-gradient(135deg, #ffe2a8, #ffbc57);
    color: var(--pb-dark);
}

.pb-account-meta-card {
    padding: 12px 14px;
    background: #fbfcfc;
    border: 1px solid var(--pb-border-light);
    border-radius: var(--pb-radius);
    min-height: 100%;
}

.pb-account-orders-table table th,
.pb-account-orders-table table td {
    vertical-align: middle;
}

.pb-order-card {
    border-color: var(--pb-border-light);
}

.pb-order-card-code code {
    font-size: 13px;
    color: var(--pb-text);
}

.pb-order-card-meta {
    display: grid;
    gap: 4px;
}

.pb-order-card-side {
    min-width: 180px;
}

.pb-order-card-total {
    color: var(--pb-text);
}

.pagination .page-link {
    color: var(--pb-link);
    border-color: var(--pb-border);
    font-size: 13px;
}
.pagination .page-item.active .page-link {
    background: var(--pb-orange);
    border-color: var(--pb-orange);
    color: var(--pb-dark);
    font-weight: 600;
}

/* ---------------------------------------------------------------
   20. Order Status Badges
--------------------------------------------------------------- */
.pb-status-pending     { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.pb-status-processing  { background: #cff4fc; color: #055160; border: 1px solid #0dcaf0; }
.pb-status-shipped     { background: #d1e7dd; color: #0a3622; border: 1px solid #198754; }
.pb-status-delivered   { background: #e7f4e4; color: var(--pb-success); border: 1px solid #c3e6bc; }
.pb-status-cancelled   { background: #fce8e6; color: var(--pb-danger); border: 1px solid #f5c6c0; }

/* ---------------------------------------------------------------
   21. Utilities
--------------------------------------------------------------- */
.pb-divider {
    border: 0;
    border-top: 2px solid var(--pb-orange);
    opacity: 1;
    width: 40px;
    margin: 12px auto;
}
.pb-text-orange { color: var(--pb-orange) !important; }
.pb-bg-dark     { background: var(--pb-dark) !important; }

/* ---------------------------------------------------------------
   22. Responsive overrides
--------------------------------------------------------------- */
@media (max-width: 768px) {
    .pb-search-select { display: none; }
    .pb-hero-title    { font-size: 24px; }
    .pb-admin-sidebar { width: 100%; min-height: auto; }

    .pb-header-row {
        gap: 8px !important;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .pb-header-logo {
        margin-right: 0 !important;
    }

    .pb-logo-mark {
        width: 32px;
        height: 32px;
    }

    .pb-logo-text {
        font-size: 19px;
    }

    .pb-logo-sub {
        font-size: 9px;
    }

    .pb-header-actions {
        margin-left: auto;
    }

    .pb-search-wrap {
        order: 10;
        width: 100%;
        min-width: 100%;
    }

    .pb-search-form {
        max-width: 100%;
    }

    .pb-header-btn,
    .pb-header-btn-primary {
        min-height: 40px;
    }

    .pb-catalog-filters-wrap {
        position: static !important;
        top: auto;
    }

    .pb-catalog-sort {
        min-width: 100%;
    }

    .pb-order-card-side {
        min-width: 100%;
        text-align: left !important;
    }

    .pb-cart-summary-card {
        position: static;
        top: auto;
    }

    .pb-product-price {
        font-size: 15px;
    }

    .pb-hero-box {
        width: 100%;
    }

    .pb-hero-panda-art {
        max-width: 300px;
    }

    .pb-product-detail-img {
        max-height: 300px;
    }

    .pb-share-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pb-product-detail-placeholder {
        height: 260px;
        font-size: 62px;
    }

    .pb-product-price-xl {
        font-size: 24px;
    }

    .pb-product-price-block {
        min-width: 100%;
    }

    .pb-qty-control {
        width: 100%;
        justify-content: center;
    }

    .pb-cart-summary {
        padding: 14px;
    }

    .pb-cart-table th,
    .pb-cart-table td {
        font-size: 12px;
    }

    .pb-cart-qty-wrap {
        justify-content: flex-start !important;
    }
}
@media (max-width: 576px) {
    .pb-header-btn-primary { display: none !important; }
    .pb-catbar-link { font-size: 12px; padding: 5px 8px; }

    .pb-search-select-compact {
        display: none;
    }

    .pb-topbar .small {
        font-size: 11px;
    }

    .pb-page-shell {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .pb-account-meta-card {
        padding: 10px 12px;
    }

    .pb-cart-table thead {
        display: none;
    }

    .pb-cart-table,
    .pb-cart-table tbody,
    .pb-cart-table tr,
    .pb-cart-table td {
        display: block;
        width: 100%;
    }

    .pb-cart-row {
        border-bottom: 1px solid var(--pb-border-light);
        padding: 12px 12px 4px;
    }

    .pb-cart-row td {
        border: 0;
        padding: 0 0 10px;
        text-align: left !important;
    }

    .pb-cart-cell-thumb {
        margin-bottom: 8px;
    }

    .pb-cart-cell-product {
        margin-bottom: 2px;
    }

    .pb-cart-cell-remove {
        padding-top: 4px !important;
    }

    .pb-cart-mobile-label {
        display: block;
    }

    .pb-cart-actions {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }

    .pb-cart-actions .btn {
        width: 100%;
    }
}
