/* ============================================
   HeatHolz.eu - Modern CSS Styles
   Charte Graphique: Bois & Chaleur
   ============================================ */

/* Variables CSS */
:root {
    --color-primary: #B03A2E;
    --color-primary-dark: #8C2D21;
    --color-secondary: #5C4033;
    --color-wood-light: #D8B384;
    --color-wood-medium: #A67C52;
    --color-neutral: #F5F0E1;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;

    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;

    --border-radius: 8px;
    --border-radius-sm: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);

    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    color: var(--color-text);
    line-height: 1.6;
    background: #fff;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 0 0 60px 0;
}

.section:first-of-type {
    padding-top: 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary) !important;
}

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

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

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

.bg-neutral {
    background: var(--color-neutral);
}

.bg-wood-light {
    background: var(--color-wood-light);
}

.bg-white {
    background: var(--color-white);
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mb-50 {
    margin-bottom: 50px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-40 {
    margin-top: 40px;
}

.mt-50 {
    margin-top: 50px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);

    /* Bootstrap Overrides */
    --bs-btn-color: var(--color-white);
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-color: var(--color-white);
    --bs-btn-hover-bg: var(--color-primary-dark);
    --bs-btn-hover-border-color: var(--color-primary-dark);
    --bs-btn-focus-shadow-rgb: 176, 58, 46;
    /* #B03A2E */
    --bs-btn-active-color: var(--color-white);
    --bs-btn-active-bg: var(--color-primary-dark);
    --bs-btn-active-border-color: var(--color-primary-dark);
    --bs-btn-disabled-color: var(--color-white);
    --bs-btn-disabled-bg: var(--color-primary);
    --bs-btn-disabled-border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn-primary:focus,
.btn-primary:active {
    background: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
    box-shadow: 0 0 0 0.25rem rgba(176, 58, 46, 0.5) !important;
    /* Primary Red Shadow */
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);

    /* Bootstrap Overrides */
    --bs-btn-color: var(--color-white);
    --bs-btn-bg: var(--color-secondary);
    --bs-btn-border-color: var(--color-secondary);
    --bs-btn-hover-color: var(--color-white);
    --bs-btn-hover-bg: var(--color-wood-medium);
    --bs-btn-hover-border-color: var(--color-wood-medium);
    --bs-btn-focus-shadow-rgb: 92, 64, 51;
    /* #5C4033 */
    --bs-btn-active-color: var(--color-white);
    --bs-btn-active-bg: var(--color-wood-medium);
    --bs-btn-active-border-color: var(--color-wood-medium);
    --bs-btn-disabled-color: var(--color-white);
    --bs-btn-disabled-bg: var(--color-secondary);
    --bs-btn-disabled-border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background: var(--color-wood-medium);
    border-color: var(--color-wood-medium);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-secondary:focus,
.btn-secondary:active {
    background: var(--color-wood-medium) !important;
    border-color: var(--color-wood-medium) !important;
    box-shadow: 0 0 0 0.25rem rgba(92, 64, 51, 0.5) !important;
    /* Secondary Wood Shadow */
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-secondary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    font-family: var(--font-secondary);
    border: 2px solid var(--color-wood-light);
    border-radius: var(--border-radius);
    background: var(--color-white);
    color: var(--color-text);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-wood-medium) !important;
    box-shadow: 0 0 0 0.25rem rgba(166, 124, 82, 0.25) !important;
    /* Wood Medium with opacity */
}

/* Global Bootstrap Button Override for any other buttons */
.btn:focus {
    box-shadow: none !important;
}

.form-control::placeholder {
    color: #999;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-5px);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-secondary);
}

.card-text {
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.card-footer {
    padding: 20px 25px;
    background: var(--color-neutral);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Product Card */
.product-card {
    position: relative;
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-8px);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--color-neutral);
}

.product-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-action-btn {
    width: 45px;
    height: 45px;
    background: var(--color-white);
    color: var(--color-secondary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.product-action-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 13px;
    color: var(--color-wood-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--color-secondary);
}

.product-title a {
    color: var(--color-secondary);
}

.product-title a:hover {
    color: var(--color-primary);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.price-old {
    font-size: 1.1rem;
    color: #999;
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.stars,
.product-stars {
    color: #FFA500;
    font-size: 14px;
    display: flex;
    gap: 2px;
}

.star-filled {
    fill: #FFA500;
    color: #FFA500;
}

.star-half {
    fill: url(#half-star-gradient);
    /* Note: Feather icons don't support partial fill easily via CSS alone without defs, but we can try a gradient or just fill it for now if simple */
    /* Simpler approach for feather icons: just color it, or use a different icon if available. 
       Feather doesn't have a half-star icon by default. 
       Let's stick to fill for filled stars. For half stars, we might need a workaround or just fill it. */
    fill: #FFA500;
    /* Fallback to full fill for now or maybe opacity */
    color: #FFA500;
}

.star-empty {
    fill: none;
    color: #FFA500;
}

.rating-count {
    font-size: 13px;
    color: var(--color-text-light);
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-1 {
    flex: 0 0 8.333%;
    max-width: 8.333%;
}

.col-2 {
    flex: 0 0 16.666%;
    max-width: 16.666%;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.badge-success {
    background: #28a745;
    color: var(--color-white);
}

.badge-warning {
    background: #ffc107;
    color: #333;
}

.badge-danger {
    background: #dc3545;
    color: var(--color-white);
}

/* Breadcrumb */
.breadcrumb {
    background: var(--color-neutral);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}

/* Désactiver le séparateur Bootstrap par défaut */
.breadcrumb-item+.breadcrumb-item::before {
    content: none !important;
    display: none !important;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    color: var(--color-text-light);
}

.breadcrumb-item a {
    color: var(--color-text);
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
}

.breadcrumb-item.active {
    color: var(--color-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--color-white);
    color: var(--color-text);
    border: 2px solid var(--color-wood-light);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.page-link.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: var(--color-white);
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: var(--color-neutral);
    color: var(--color-secondary);
    font-weight: 600;
    font-family: var(--font-primary);
}

.table tbody tr:hover {
    background: var(--color-neutral);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-neutral);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .section {
        padding: 0 0 40px 0;
    }

    .section:first-of-type {
        padding-top: 0;
    }

    .col-3,
    .col-4,
    .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .col-3,
    .col-4,
    .col-6,
    .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 30px 0;
    }

    .card-body {
        padding: 20px;
    }

    .product-img {
        height: 220px;
    }
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin: 10px 0;
}

input[type=range]:focus {
    outline: none;
}

/* Webkit (Chrome, Safari, Edge) */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    transition: transform 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--color-wood-light);
    border-radius: 2px;
}

/* Firefox */
input[type=range]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

input[type=range]::-moz-range-thumb:hover {
    transform: scale(1.1);
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--color-wood-light);
    border-radius: 2px;
}

/* ============================================
   REVIEWS & STARS RATING SYSTEM
   ============================================ */

/* Container des étoiles */
.product-stars {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.product-stars.small-stars {
    gap: 2px;
}

.product-stars.review-stars {
    gap: 4px;
}

/* Étoiles - États */
.product-stars i {
    width: 18px;
    height: 18px;
    stroke: #FFB800;
    fill: none;
    stroke-width: 2;
    transition: var(--transition);
}

.product-stars.small-stars i {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.product-stars.review-stars i {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Étoile pleine */
.product-stars i.star-filled {
    fill: #FFB800;
    stroke: #FFB800;
}

/* Demi-étoile */
.product-stars i.star-half {
    fill: url(#half-fill);
    stroke: #FFB800;
}

/* Étoile vide */
.product-stars i.star-empty {
    fill: none;
    stroke: #E0E0E0;
}

/* Rating wrapper */
.product-rating-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.product-rating-small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
}

.rating-text,
.rating-count {
    font-size: 14px;
    color: var(--color-text-light);
    font-weight: 500;
}

.rating-text strong {
    color: var(--color-text);
    font-weight: 700;
}

/* Product Rating dans cards */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
}

.product-rating .stars {
    display: flex;
    gap: 2px;
}

/* Review Items */
.review-item {
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--color-primary);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.review-author {
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 15px;
}

.review-date {
    font-size: 13px;
    color: var(--color-text-light);
}

.review-text {
    color: var(--color-text);
    line-height: 1.7;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .product-stars i {
        width: 16px;
        height: 16px;
    }

    .product-stars.small-stars i {
        width: 12px;
        height: 12px;
    }

    .review-item {
        padding: 20px 15px;
    }

    .rating-text,
    .rating-count {
        font-size: 13px;
    }
}