/* ==========================================================================
   GESIB.RO - Storefront Stylesheet (Autumn Pastel & Display Wide 1560px)
   ========================================================================== */

:root {
    --bg-page: #FDFBF7;
    --bg-surface: #FFFFFF;
    --bg-alt: #F6EFE6;
    --bg-warm: #EFE6DA;
    --brand-crimson: #C82333;
    --brand-crimson-hover: #A31826;
    --brand-dark: #1F1A17;
    --brand-muted: #6B5F57;
    --brand-border: #E8DFD5;
    --b2b-orange: #C25E00;
    --b2b-light: #FFF4E5;
    --success: #28A745;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 4px rgba(31, 26, 23, 0.05);
    --shadow-md: 0 4px 12px rgba(31, 26, 23, 0.08);
    --shadow-lg: 0 10px 25px rgba(31, 26, 23, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--brand-dark);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

/* Container Wide (1560px) */
.container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= Top Bar ================= */
.top-bar {
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--brand-border);
    font-size: 13px;
    color: var(--brand-muted);
    padding: 7px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-links {
    display: flex;
    align-items: center;
    gap: 18px;
}
.top-links a:hover {
    color: var(--brand-crimson);
}
.badge-b2b-pill {
    background: var(--b2b-orange);
    color: #FFF;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

/* ================= Main Header ================= */
.header-main {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--brand-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}
.header-logo img {
    height: 52px;
    display: block;
}
.header-search {
    flex: 1;
    max-width: 680px;
    position: relative;
}
.search-form {
    display: flex;
    border: 2px solid var(--brand-crimson);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.search-input {
    flex: 1;
    padding: 11px 16px;
    border: none;
    font-size: 14px;
    outline: none;
    background: #FFF;
}
.search-btn {
    background: var(--brand-crimson);
    color: #FFF;
    border: none;
    padding: 0 22px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.search-btn:hover {
    background: var(--brand-crimson-hover);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.price-toggle-box {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    padding: 4px;
    border-radius: 20px;
    border: 1px solid var(--brand-border);
    font-size: 12px;
    font-weight: 700;
}
.price-toggle-btn {
    padding: 5px 12px;
    border-radius: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--brand-muted);
}
.price-toggle-btn.active {
    background: var(--bg-surface);
    color: var(--brand-crimson);
    box-shadow: var(--shadow-sm);
}

.action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}
.action-item:hover {
    background: var(--bg-alt);
    border-color: var(--brand-border);
}
.action-icon {
    font-size: 22px;
    color: var(--brand-crimson);
}
.action-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.action-label {
    font-size: 11px;
    color: var(--brand-muted);
    font-weight: 500;
}
.action-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-dark);
}
.cart-badge-count {
    background: var(--brand-crimson);
    color: #FFF;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 4px;
}

/* ================= Mega Nav Bar ================= */
.nav-bar {
    background: var(--brand-dark);
    color: #FFF;
    border-bottom: 2px solid var(--brand-crimson);
}
.nav-list {
    display: flex;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.nav-list::-webkit-scrollbar {
    display: none;
}
.nav-item {
    position: relative;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 18px;
    font-size: 13.5px;
    font-weight: 600;
    color: #F1ECE6;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}
.nav-link:hover, .nav-item.active .nav-link {
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
    border-bottom-color: var(--brand-crimson);
}
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFF;
    color: var(--brand-dark);
    min-width: 250px;
    border: 1px solid var(--brand-border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 150;
}
.nav-item:hover .nav-dropdown {
    display: block;
}
.dropdown-link {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid #F5EFEB;
    transition: background 0.2s, padding-left 0.2s;
}
.dropdown-link:hover {
    background: var(--bg-alt);
    color: var(--brand-crimson);
    padding-left: 20px;
}

/* ================= Hero / Banner ================= */
.hero-section {
    padding: 24px 0 10px 0;
}
.hero-card {
    background: linear-gradient(135deg, #FFF9F3 0%, #F5ECE0 100%);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 35px 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.hero-content {
    max-width: 750px;
    z-index: 2;
}
.hero-badge {
    display: inline-block;
    background: var(--b2b-orange);
    color: #FFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--brand-dark);
    margin-bottom: 12px;
}
.hero-title span {
    color: var(--brand-crimson);
}
.hero-subtitle {
    font-size: 15px;
    color: var(--brand-muted);
    margin-bottom: 22px;
}
.hero-buttons {
    display: flex;
    gap: 14px;
}
.btn-primary {
    background: var(--brand-crimson);
    color: #FFF;
    padding: 12px 26px;
    border-radius: var(--radius-md);
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover {
    background: var(--brand-crimson-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background: #FFF;
    color: var(--brand-dark);
    border: 1px solid var(--brand-border);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.btn-secondary:hover {
    background: var(--bg-alt);
    border-color: #D2C4B5;
}
.hero-perks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.85);
    padding: 20px 25px;
    border-radius: var(--radius-md);
    border: 1px solid var(--brand-border);
    min-width: 320px;
}
.perk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 600;
}
.perk-icon {
    font-size: 20px;
    color: var(--b2b-orange);
}

/* ================= Main Layout (Sidebar + Catalog) ================= */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    padding: 25px 0 60px 0;
}

/* Filter Sidebar */
.filter-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}
.filter-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--brand-dark);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--brand-border);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.category-filter-list {
    list-style: none;
    margin-bottom: 24px;
}
.cat-item-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--brand-dark);
    cursor: pointer;
    transition: background 0.2s;
}
.cat-item-link:hover, .cat-item-link.active {
    background: var(--bg-alt);
    color: var(--brand-crimson);
    font-weight: 700;
}
.filter-group {
    margin-bottom: 20px;
}
.filter-group-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-muted);
    margin-bottom: 10px;
}
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 6px;
}

/* Product Catalog */
.catalog-header {
    background: var(--bg-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.catalog-info {
    font-size: 14px;
    color: var(--brand-muted);
}
.catalog-info strong {
    color: var(--brand-dark);
}
.catalog-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}
.catalog-sort select {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--brand-border);
    background: #FFF;
    outline: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #D1C3B2;
}
.card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.badge-discount {
    background: var(--brand-crimson);
    color: #FFF;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}
.badge-b2b {
    background: var(--b2b-orange);
    color: #FFF;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}
.product-thumb {
    width: 100%;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
.product-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}
.product-card:hover .product-thumb img {
    transform: scale(1.05);
}
.product-meta {
    font-size: 11px;
    color: var(--brand-muted);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}
.product-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--brand-dark);
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
}
.product-name:hover {
    color: var(--brand-crimson);
}
.product-pricing {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 12px;
}
.price-primary {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.price-val {
    font-size: 18px;
    font-weight: 900;
    color: var(--brand-crimson);
}
.price-old {
    font-size: 12px;
    color: var(--brand-muted);
    text-decoration: line-through;
}
.price-secondary {
    font-size: 11.5px;
    color: var(--brand-muted);
    margin-top: 2px;
}
.product-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.btn-add-cart {
    flex: 1;
    background: var(--brand-crimson);
    color: #FFF;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-add-cart:hover {
    background: var(--brand-crimson-hover);
}
.btn-quick-view {
    background: #FFF;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--brand-dark);
}
.btn-quick-view:hover {
    background: var(--bg-alt);
}

/* ================= Quick View / Matrix Modal ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 26, 23, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-box {
    background: #FFF;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    padding: 30px;
}
.modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--brand-muted);
}
.modal-close:hover {
    color: var(--brand-crimson);
}
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}
.matrix-table th, .matrix-table td {
    padding: 8px 12px;
    border: 1px solid var(--brand-border);
    text-align: left;
}
.matrix-table th {
    background: var(--bg-alt);
    font-weight: 700;
}
.matrix-table tr:hover {
    background: #FFF9F3;
}

/* ================= Side Cart Drawer ================= */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 440px;
    max-width: 100vw;
    height: 100vh;
    background: #FFF;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 1100;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.cart-drawer.open {
    right: 0;
}
.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--brand-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.cart-item-row {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--brand-border);
}
.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
}
.cart-item-details {
    flex: 1;
}
.cart-item-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}
.cart-item-price {
    font-size: 13px;
    color: var(--brand-crimson);
    font-weight: 800;
}
.cart-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.cart-qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--brand-border);
    background: var(--bg-alt);
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
}
.cart-drawer-footer {
    padding: 20px;
    background: var(--bg-alt);
    border-top: 1px solid var(--brand-border);
}
.cart-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 900;
    color: var(--brand-crimson);
    margin: 12px 0;
    padding-top: 8px;
    border-top: 1px solid var(--brand-border);
}

/* ================= Footer Wide ================= */
.footer-wide {
    background: #191513;
    color: #D1C5BD;
    padding: 55px 0 25px 0;
    font-size: 13px;
    border-top: 4px solid var(--brand-crimson);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #FFF;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 9px;
}
.footer-col ul li a:hover {
    color: var(--brand-crimson);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--brand-dark);
    color: #FFF;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--brand-crimson);
}
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--b2b-orange); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ================= Responsive Adjustments ================= */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 240px 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .filter-sidebar {
        display: none; /* Mobile filter accordion toggle */
    }
    .hero-card {
        flex-direction: column;
        padding: 25px 20px;
    }
    .hero-perks {
        min-width: 100%;
        margin-top: 20px;
    }
    .header-row {
        flex-wrap: wrap;
    }
    .header-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .top-bar-inner {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-thumb {
        height: 130px;
    }
    .product-name {
        font-size: 12px;
        height: 32px;
    }
    .price-val {
        font-size: 15px;
    }
}
