/* Core Variables: Rocola Corporate Green Palette */
:root {
    --rocola-green-primary: #2e7d32;
    --rocola-green-dark: #1b5e20;
    --rocola-green-light: #4caf50;
    --rocola-accent: #ffeb3b;
    --bg-light: #f9fbf9;
    --text-dark: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Force all containers to span the full viewport width */
.container, .container-fluid {
    max-width: 100% !important;
    padding-left: 2%;
    padding-right: 2%;
}

#content {
    max-width: 100%;
    margin: 0 auto;
}

.rocola-page-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 1%;
}

/* Dynamic App Layout */
.rocola-app-container {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    align-items: flex-start;
    width: 100%;
}

/* Sidebar Filters */
.rocola-filters {
    flex: 0 0 250px;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid var(--rocola-green-primary);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--rocola-green-dark);
}

.filter-group input[type="range"] {
    width: 100%;
    accent-color: var(--rocola-green-primary);
}

section.rocola-product-grid {
  display: grid;
  --max-columns: 15;
  --gap: 1rem;

  --gap-count: calc(var(--max-columns) - 1);
  --total-gap-width: calc(var(--gap-count) * var(--gap));
  --max-item-width: calc((100% - var(--total-gap-width)) / var(--max-columns));

  grid-gap: var(--gap);
  /* The item can shrink down to 200px, but its "maximum minimum" is restricted by --max-item-width */
  grid-template-columns: repeat(auto-fill, minmax(max(200px, var(--max-item-width)), 1fr));
  width: 100%;
}

.product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(46, 125, 50, 0.15);
    border-color: var(--rocola-green-primary);
}
.product-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--rocola-green-dark);
}

.product-info .sku {
    font-size: 0.8rem;
    color: #888;
    margin: 0 0 1rem 0;
}

.product-info .price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--rocola-green-primary);
    margin: 0;
}

/* Promotion Badges */
.promo-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--rocola-accent);
    color: var(--rocola-green-dark);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card.promo-active {
    border: 2px solid var(--rocola-accent);
}

/* Tablet & Mobile Responsiveness */
@media (max-width: 1200px) {
    .rocola-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rocola-app-container {
        flex-direction: column;
    }
    .rocola-filters {
        width: 100%;
    }
    .rocola-product-grid {
        grid-template-columns: 1fr;
    }
}

.h3-equivalent {
  font-size: 1.17em;
  font-weight: bold;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
}

/* Dual Range Slider Styles */
.multi-range-container {
    position: relative;
    width: 100%;
    height: 30px;
}

.multi-range-container input[type="range"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    outline: none;
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    background-color: transparent;
    pointer-events: none;
}

.slider-track {
    width: 100%;
    height: 6px;
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    border-radius: 3px;
    background-color: #ddd;
    z-index: 1;
}

.multi-range-container input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    height: 6px;
}

.multi-range-container input[type="range"]::-moz-range-track {
    -moz-appearance: none;
    height: 6px;
}

.multi-range-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    background-color: var(--rocola-green-primary);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    margin-top: -7px;
    z-index: 2;
    position: relative;
}

.multi-range-container input[type="range"]::-moz-range-thumb {
    -moz-appearance: none;
    height: 20px;
    width: 20px;
    background-color: var(--rocola-green-primary);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    border: none;
    z-index: 2;
    position: relative;
}

.multi-range-container input[type="range"]:active::-webkit-slider-thumb {
    background-color: var(--rocola-green-dark);
    transform: scale(1.1);
}
