/* ==========================================================================
   CeleMaiBuneDealuri - Main Stylesheet (Single CSS File)
   Cold Color Palette & Enhanced Price / Brand Link Visibility
   ========================================================================== */

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

:root {
    --bg-page: #f4f7fa;
    --bg-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --price-color: #172554;
    --brand-link-color: #0f766e;
    --brand-link-hover: #115e59;
    --border-color: #e2e8f0;
    --border-dark: #1e293b;
    --accent-cold: #0284c7;
    --accent-cold-hover: #0369a1;
    --accent-cold-soft: #e0f2fe;
    --card-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-cold: 0 0 14px rgba(2, 132, 199, 0.35);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.45;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 100%;
    display: block;
}

.header-search-form {
    position: relative;
    width: 100%;
    max-width: 380px;
    min-width: 0;
}

.header-search-input {
    width: 100%;
    height: 40px;
    padding: 0 42px 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-white);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-search-input::placeholder {
    color: #94a3b8;
}

.header-search-input:focus {
    border-color: var(--accent-cold);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.header-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.header-search-btn:hover {
    color: var(--accent-cold);
}

/* ==========================================================================
   Catalog Toolbar (Count + Sort)
   ========================================================================== */
.site-main {
    flex: 1;
    padding: 20px 0 48px;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.catalog-count-heading {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.catalog-count-heading strong {
    font-weight: 700;
}

.catalog-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.catalog-sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 13px;
    color: var(--text-primary);
}

.sort-select {
    height: 36px;
    min-width: 175px;
    padding: 0 30px 0 12px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    background-color: var(--bg-white);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: var(--accent-cold);
}

/* ==========================================================================
   Catalog Layout (Sidebar + Product Grid)
   ========================================================================== */
.catalog-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.catalog-results {
    min-width: 0;
    max-width: 100%;
}

/* Sidebar Filters */
.filters-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}

.filters-sidebar form {
    min-width: 0;
    max-width: 100%;
}

.btn-reset-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    background-color: var(--bg-white);
    border: 1.5px solid var(--accent-cold);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cold);
    margin-bottom: 16px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-reset-filters:hover {
    background-color: var(--accent-cold);
    color: var(--bg-white);
}

.filter-card {
    background-color: var(--bg-white);
    border-radius: var(--card-radius);
    padding: 18px 18px 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf0f5;
    margin-bottom: 18px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.filter-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.filter-search-wrap {
    margin-bottom: 10px;
}

.filter-list-search {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
}

.filter-list-search:focus {
    border-color: var(--accent-cold);
}

.filter-checkbox-list {
    max-height: 225px;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.filter-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.filter-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    user-select: none;
    flex: 1;
    min-width: 0;
}

.filter-checkbox-label input[type="checkbox"],
.filter-checkbox-label input[type="radio"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--accent-cold);
    flex-shrink: 0;
}

.checkbox-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-direct-link {
    font-size: 11px;
    color: var(--text-secondary);
    background-color: #f1f5f9;
    padding: 1px 6px;
    border-radius: 999px;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.filter-direct-link:hover {
    background-color: var(--accent-cold);
    color: var(--bg-white);
}

.price-filter-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
    min-width: 0;
}

.price-input-group {
    flex: 1 1 0%;
    min-width: 0;
}

.filter-number-input {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 13px;
    color: var(--text-primary);
}

.price-sep {
    color: var(--text-muted);
    flex-shrink: 0;
}

.price-quick-ranges {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ==========================================================================
   Product Grid & Cards (5 Columns)
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: var(--card-radius);
    padding: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf0f5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-cold);
    border-color: rgba(2, 132, 199, 0.55);
}

.product-card-image-link {
    display: block;
    margin-bottom: 12px;
}

.product-image-box {
    position: relative;
    width: 100%;
    height: 175px;
    background-color: var(--bg-white);
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.multi-offer-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--accent-cold);
    color: var(--bg-white);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.38;
    height: 54px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
}

.product-title-link:hover {
    color: var(--accent-cold);
}

.product-card-meta {
    margin-bottom: 12px;
    min-height: 18px;
}

.product-meta-brand {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-link-color);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-block;
    transition: color 0.15s ease;
}

.product-meta-brand:hover {
    color: var(--brand-link-hover);
    text-decoration: underline;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.product-price {
    font-size: 17.5px;
    font-weight: 800;
    color: var(--price-color);
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.btn-view-offer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 36px;
    padding: 0 12px;
    background-color: var(--accent-cold);
    color: var(--bg-white);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-view-offer:hover {
    background-color: var(--accent-cold-hover);
    color: var(--bg-white);
}

.btn-view-offer-icon {
    flex-shrink: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination-nav {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.pagination-list {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.pagination-link:hover {
    border-color: var(--accent-cold);
    background-color: var(--accent-cold-soft);
    color: var(--accent-cold-hover);
}

.pagination-link.is-active {
    background-color: var(--accent-cold);
    border-color: var(--accent-cold);
    color: var(--bg-white);
}

.pagination-ellipsis {
    padding: 0 6px;
    color: var(--text-muted);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-results-card {
    background-color: var(--bg-white);
    border-radius: var(--card-radius);
    padding: 48px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.empty-results-card h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-results-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-inline-reset {
    padding: 0 20px;
    height: 40px;
    font-size: 13px;
}

/* ==========================================================================
   Product Details & GTIN Multi-Merchant Variants Page
   ========================================================================== */
.breadcrumb-nav {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.breadcrumb-nav a:hover {
    color: var(--accent-cold);
    text-decoration: underline;
}

.breadcrumb-current {
    color: var(--text-muted);
}

.product-detail-card {
    background-color: var(--bg-white);
    border-radius: var(--card-radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.product-detail-top {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

.product-detail-image-col {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 16px;
    height: 300px;
}

.product-detail-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-detail-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}

.product-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--text-secondary);
}

.product-detail-badges a {
    color: var(--brand-link-color);
    font-weight: 700;
}

.product-detail-badges a:hover {
    color: var(--brand-link-hover);
    text-decoration: underline;
}

.product-detail-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.product-variants-section {
    padding-top: 24px;
}

.variants-heading {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.variants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variant-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 24px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #fafbfc;
}

.variant-merchant-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.variant-merchant-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-link-color);
}

.variant-merchant-name:hover {
    color: var(--brand-link-hover);
    text-decoration: underline;
}

.variant-product-title {
    font-size: 13px;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.variant-price {
    font-size: 21px;
    font-weight: 800;
    color: var(--price-color);
    letter-spacing: -0.02em;
}

.btn-variant-offer {
    padding: 0 18px;
    height: 40px;
    font-size: 13px;
}

/* ==========================================================================
   Static Content Pages (/about, /contact, /privacy-policy, /terms-and-conditions)
   ========================================================================== */
.static-page-wrapper {
    max-width: 960px;
}

.static-page-card {
    background-color: var(--bg-white);
    border-radius: var(--card-radius);
    padding: 36px 40px;
    box-shadow: var(--shadow-sm);
}

.static-page-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 16px;
}

.static-lead {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.static-page-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 10px;
}

.static-page-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 18px 0 8px;
}

.static-page-card p {
    margin-bottom: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.static-page-card ul {
    margin: 0 0 16px 22px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.static-page-card li {
    margin-bottom: 6px;
}

.static-page-card a {
    color: var(--accent-cold);
    font-weight: 600;
}

.static-page-card a:hover {
    color: var(--accent-cold-hover);
    text-decoration: underline;
}

.company-highlight-box,
.contact-info-box {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.contact-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 20px;
    font-size: 13px;
}

.legal-table th,
.legal-table td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
}

.legal-table th {
    background-color: #f8fafc;
    font-weight: 700;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   Footer (Required Company & Operator Disclosure)
   ========================================================================== */
.site-footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 36px 0 24px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr;
    gap: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.footer-logo-img {
    height: 34px;
    width: auto;
    margin-bottom: 12px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.footer-heading {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-info-list,
.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-info-list a,
.footer-nav-list a {
    color: var(--text-primary);
    font-weight: 500;
}

.footer-info-list a:hover,
.footer-nav-list a:hover {
    color: var(--accent-cold);
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   Responsive Design Breakpoints (Functional down to 320px)
   ========================================================================== */
@media (max-width: 1380px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .catalog-layout {
        grid-template-columns: 270px minmax(0, 1fr);
    }
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .catalog-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-detail-top {
        grid-template-columns: minmax(0, 1fr);
    }
    .variant-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .container {
        padding: 0 12px;
    }
    .site-header {
        padding: 12px 0;
    }
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .brand-logo {
        justify-content: flex-start;
    }
    .logo-img {
        height: auto;
        max-height: 36px;
        max-width: 240px;
    }
    .header-search-form {
        max-width: 100%;
    }
    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .catalog-count-heading,
    .catalog-subtitle {
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .catalog-sort-box {
        width: 100%;
        justify-content: space-between;
    }
    .sort-select-wrap {
        flex: 1;
        min-width: 0;
    }
    .sort-select {
        width: 100%;
        min-width: 0;
    }
    .filter-card {
        padding: 14px 12px;
        margin-bottom: 12px;
    }
    .products-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .product-card-footer {
        flex-wrap: wrap;
        gap: 8px;
    }
    .product-detail-card,
    .static-page-card {
        padding: 18px 14px;
    }
    .product-detail-image-col {
        height: 220px;
    }
    .product-detail-title,
    .static-page-title {
        font-size: 19px;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .legal-table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }
    .footer-info-list li,
    .footer-nav-list li {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

