:root {
    --verde-deschis: #76BEB4;
    --verde-inchis: #005B53;
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

main {
    flex: 1;
    margin: 0 auto;
    width: 100%;
}

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

a:hover {
    cursor: pointer;
}

/* Restaurare dimensiuni font default pentru headings */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
    font-weight: bold;
}

body h1 {
    font-size: 2em;
}

body h2 {
    font-size: 1.5em;
}

body h3 {
    font-size: 1.17em;
}

body h4 {
    font-size: 1em;
}

body h5 {
    font-size: 0.83em;
}

body h6 {
    font-size: 0.67em;
}

.white-space {
    white-space: nowrap;
}

.alert {
    padding: 12px 20px;
    margin: 20px 0;
    border-radius: 6px;
    text-align: center;
    position: fixed;
    top: 20px;
    right: 0;
    transform: translateX(-50%);
    width: auto;
    max-width: 500px;
    z-index: 9999;
    transition: opacity 0.5s ease;
}


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


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

.error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Stiluri de bază pentru alert-box */
/* Varianta pentru success */

.alert-box.alert-success {
    background-color: #d1fae5;
    /* bg-green-100 */
    color: #065f46;
    /* text-green-800 */
}

/* Varianta pentru error */

.alert-box.alert-error {
    background-color: #fee2e2;
    /* bg-red-100 */
    color: #991b1b;
    /* text-red-800 */
}

/* Ascunde alerta */

.alert-box.hidden {
    display: none;
}

.alert-box {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    max-width: 400px;
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease;
}

.actiuni-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.actiuni-container img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

@media(max-width: 600px) {
    .actiuni-container {
        justify-content: center;
    }
}


/* START css pentru articol produs */
/* ═══════════════════════════════════════════════════════════════
   PRODUCT CARD WITH VARIANTS
   ═══════════════════════════════════════════════════════════════ */

.product-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--dark-light-color);
    padding: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    /* width: 100%;
    height: 100%; */
}

.product-card .variants-strip:only-child {
    display: none;
}

.product-card:hover {
    box-shadow: 0 8px 25px rgba(13, 102, 13, 0.2);
}

/* ── IMAGINE PRINCIPALĂ ── */
.product-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    /* background: #f8f9fa; */
    border-radius: 8px;
}

.product-image-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image-container.is-out {
    filter: grayscale(0.6);
}

/* Border animat PE CONTAINERUL CU IMAGINE */

.product-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product img {
    /* max-width: 90%; */
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* pentru stock negativ */
.out-of-stock-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.15) 0%,
            rgba(0, 0, 0, 0.65) 100%);

    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    z-index: 5;

    opacity: 0;
    transition: opacity 0.3s ease;

}

/* Activ doar când produsul e out */
.product-image-container.is-out .out-of-stock-overlay {
    opacity: 1;
}

/* Text premium */
.out-of-stock-text {
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    max-width: 95%;
    padding: 5px;
    border-radius: 50px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;

    text-transform: uppercase;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.product-image-container.is-out img {
    filter: grayscale(100%) brightness(0.95);
}

.product-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.product-image-wrapper:hover .product-main-img {
    transform: scale(1.03);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Out of stock overlay */
.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.out-of-stock-text {
    background: rgba(0, 0, 0, 0.7);
    color: var(--light-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wishlist-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--verde-deschis);
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wishlist-btn:hover {
    background: #fff;
    color: var(--verde-deschis);
    transform: scale(1.1);
}

/* ── INFO PRODUS ── */
.product-info {
    padding: 5px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* .product-info .product-name {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.6em;
    line-height: 1.2;
} */

.product-info a {
    display: block;
    font-weight: 600;
    width: 100%;
}

.product-info .product-name:hover {
    color: var(--verde-inchis);
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    font-size: 0.9rem;
}

.stars-bg {
    color: #d1d5db;
    letter-spacing: 1px;
}

.stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    color: #fbbf24;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 1px;
}

.review-count {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Prețuri */
.product-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.price-current {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.price-old {
    font-size: 0.8rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.price-discount-badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: #fee2e2;
    color: #dc2626;
    padding: 2px 6px;
    border-radius: 4px;
}

.new-badge {
    position: absolute;
    top: 20px;
    left: 0;
    background-color: var(--verde-inchis);
    color: white;
    font-weight: bold;
    padding-block: 4px;
    padding-left: 6px;
    padding-right: 20px;
    font-size: 12px;
    z-index: 10;

    /* triunghi în dreapta pentru forma de steag */
    clip-path: polygon(100% 0, 80% 48%, 100% 100%, 0% 100%, 0 50%, 0% 0%);

}

/* ── BANDĂ VARIANTE ── */
/* .variants-strip {
    padding: 0 14px 14px;
    margin-top: auto;
} */
.variant-code-display {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}
.variants-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.variants-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    height: 160px;
    flex: 1;
    min-width: 0;
    position: relative;
}

.variants-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}
.details-variants-carousel {
    position: relative;
    display: flex;
    place-items: center;
}

/* Variant Chip */
.variant-chip {
    flex-shrink: 0;
    width: 92px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 4px;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.variant-chip:hover {
    border-color: var(--button-color);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
    /* transform: translateY(-1px); */
}

.variant-chip.variant-selected {
    border-color: var(--dark-light-color);
    /* box-shadow: 0 0 0 2px rgba(59,130,246,0.2); */
}

.variant-chip.variant-out {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f9fafb;
}

.variant-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 5px;
    overflow: hidden;
    /* background: #f3f4f6; */
    margin-bottom: 5px;
}

.variant-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.variant-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
}

.variant-out-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: var(--light-color);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Text variantă */
.variant-name {
    font-size: 0.65rem;
    font-weight: 500;
    color: #374151;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.variant-price {
    font-size: 0.7rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 5px;
}

/* Buton Add */
.variant-cart-form {
    margin: 0;
}

.variant-add-btn {
    width: 100%;
    height: 24px;
    background: var(--button-color);
    color: var(--light-color);
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.variant-add-btn:hover {
    background: var(--button-hover);
}

.variant-add-btn--disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.variant-add-btn--disabled:hover {
    background: #d1d5db;
}

/* ═══════════════════════════════════════════════════════════════
   VARIANTS CAROUSEL WITH ARROWS
   ═══════════════════════════════════════════════════════════════ */

/* .variants-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
} */



/* Săgeți */
.variants-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: var(--verde-inchis, #005B53);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.variants-arrow:hover {
    background: var(--verde-inchis, #005B53);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.variants-arrow:active {
    transform: scale(0.95);
}

.variants-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: #f9fafb;
    color: #9ca3af;
}
.variants-arrow--prev {
    position: absolute;
    left: -4px;
}

.variants-arrow--next {
    position: absolute;
    right: -4px;
}
/* Pe mobil — ascunde săgețile (touch swipe e suficient) */
@media (max-width: 640px) {
    .variants-arrow {
        display: none;
    }
}


/* ============================================
   BUTON ADAUGARE PENTRU O SINGURĂ VARIANTĂ
   ============================================ */

.single-variant-add {
    /* margin-top: auto; */
    width: 100%;
}

.single-variant-add .add-to-cart-form {
    width: 100%;
}

.single-variant-add .add-to-cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--button-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.single-variant-add .add-to-cart-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.single-variant-add .add-to-cart-btn:active {
    transform: scale(0.97);
}

.single-variant-add .add-to-cart-btn i {
    font-size: 1.2rem;
}

.single-variant-add .add-to-cart-btn.disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.single-variant-add .add-to-cart-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}


/* SFARSIT css pentru articol produs */

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.input-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

}


.input-form label {
    font-weight: 500;
    color: var(--dark-color);
}


.input-form input,
.input-form select,
.input-form textarea {
    padding: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-size: 1rem;
    border: 1px solid var(--border-form);
    border-radius: 4px;
}


.input-form textarea {
    resize: vertical;
}

.input-form input:focus {
    outline: none;
    border-color: var(--medium-color);
}


/* stiluri pentru filtre */
/* Filter Categories */
.filter-categories {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.category-item {
    margin-bottom: 2px;
}

.category-item .subcategories {
    border-left: 2px solid #e9ecef;
    margin-left: 5px;
    padding-left: 15px;
    width: 100%;
}

.filter-label.has-children {
    font-weight: 600;
}

.filter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    cursor: pointer;
    /* white-space: nowrap; */
    font-size: 14px;
    /* transition: background 0.2s; */
}

.filter-label:hover {
    background: #e3e3e5;
}

.filter-label span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
}

.attributes-checkbox-list {
    display: flex;
    gap: 0.6rem;
    width: 100%;
    flex-wrap: wrap;
}

.category-count,
.brand-count {
    /* background: #e9ecef; */
    padding: 1px 8px;
    border-radius: 12px;
    /* font-size: 12px; */
    /* color: #6c757d; */
    white-space: nowrap;
}

/* Accordion styles */

.filter-categories .accordion-item {
    border-bottom: 1px solid #e9ecef;
}

.accordion-header {
    padding-left: 1rem;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    -webkit-user-select: none;
    user-select: none;
}

.filter-categories .accordion-content {
    padding: 5px 0 15px 0;
}

.filter-categories .filter-form-action {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.filter-categories .filter-form-action .button {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
}


button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

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


/* START STILURI PAGINATOR */
/* Container paginator */
.paginator {
    max-width: 400px;
    display: grid;
    place-items: center;
    margin: auto;
    padding: 10px;
    text-align: center;
}

.paginator-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Wrapper pentru butoane */
.paginator-wrapper {
    display: inline-flex;
    gap: 5px;
    margin-bottom: 8px;
    justify-content: center;
}

/* Butoane next/prev */
.paginator-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: var(--light-color);
    text-decoration: none;
    /* border-radius: 4px; */
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.paginator .paginator-btn:hover {
    background-color: var(--button-hover);
    color: var(--light-color);
}

.paginator-btn.disabled {
    background-color: #cbd5e1;
    color: #6b7280;
    cursor: not-allowed;
}

/* Pagină individuală */
.paginator-page {
    display: inline-block;
    padding: 6px 10px;
    background-color: #f3f4f6;
    color: #111827;
    text-decoration: none;
    /* border-radius: 4px; */
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.paginator .paginator-page:hover {
    background-color: #6b7280;
    color: var(--light-color);
}

/* Pagina curentă */
.paginator-page.current {
    background-color: #434750;
    color: var(--light-color);
    cursor: default;
}

/* Dots separator */
.paginator-dots {
    display: inline-block;
    padding: 6px 10px;
    color: #6b7280;
}

/* Info text (Showing X to Y of Z) */
.paginator-info {
    font-size: 0.875rem;
    color: #374151;
}

@media (max-width: 500px) {
    .paginator-nav {
        flex-direction: column;
        gap: 10px;
    }
}

/* SFARSIT STILURI PAGINATOR */
