/**
 * Shop/Archive Page - Dundle Style
 * Officelicentie Theme
 */

/* ========================================
   Shop Wrapper
   ======================================== */
.shop-v2-wrapper {
    background-color: #fff;
    padding: 32px 24px;
}

.shop-v2-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   Sidebar Filters
   ======================================== */
.shop-v2-sidebar {
    position: sticky;
    top: 150px;
    align-self: start;
}

.filter-group {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
}

.filter-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.filter-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
    transition: transform 0.2s;
    margin-left: auto;
}

.filter-toggle[aria-expanded="false"] {
    transform: rotate(180deg);
}

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Checkbox Filters */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.filter-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-checkbox input:checked + .checkmark {
    background-color: #10b981;
    border-color: #10b981;
}

.filter-checkbox input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox .filter-label {
    flex: 1;
}

.filter-checkbox .filter-count {
    color: #9ca3af;
}

/* Price Range Inputs */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-input {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    flex: 1;
}

.price-input .currency {
    color: #6b7280;
    margin-right: 4px;
}

.price-input input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #111827;
}

.price-input input::placeholder {
    color: #9ca3af;
}

.price-separator {
    font-size: 14px;
    color: #6b7280;
}

/* ========================================
   Main Content
   ======================================== */
.shop-v2-main {
    min-width: 0;
}

/* Shop Header */
.shop-v2-header {
    margin-bottom: 32px;
}

.shop-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.shop-header-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.shop-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.shop-results-count {
    font-size: 14px;
    color: #6b7280;
}

.shop-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Partner Badge */
.shop-partner-badge {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    margin-top: -40px;
}

.shop-partner-badge .partner-logo {
    height: 120px;
    width: auto;
}

.shop-sorting {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-label {
    font-size: 14px;
    color: #6b7280;
}

/* WooCommerce ordering dropdown override */
.shop-sorting .woocommerce-ordering {
    margin: 0;
}

.shop-sorting .woocommerce-ordering select,
.shop-sorting select.orderby {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 36px 10px 16px;
    font-size: 14px;
    color: #111827;
    background-color: #fff;
    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 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 160px;
}

/* Category Description with Partner Badge */
.shop-category-description-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.shop-category-description {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    flex: 1;
    max-width: 700px;
}

.shop-category-description .description-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-category-description.expanded .description-text {
    display: block;
    -webkit-line-clamp: unset;
}

.shop-category-description p {
    font-size: 0.875rem;
    letter-spacing: 0px;
    line-height: 1.42857143;
    color: #1f274a;
    margin: 0;
}

.description-read-more {
    background: none;
    border: none;
    color: #047857;
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    margin-top: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.description-read-more:hover {
    color: #065f46;
    text-decoration: underline;
}

.shop-category-description a {
    color: #047857;
    text-decoration: none;
}

.shop-category-description a:hover {
    text-decoration: underline;
}

/* ========================================
   Products Grid
   ======================================== */
.shop-v2-main ul.products,
.shop-v2-main .products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-v2-main ul.products li.product {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Hide default WooCommerce product content when using our card */
.shop-v2-main ul.products li.product > a,
.shop-v2-main ul.products li.product > .button,
.shop-v2-main ul.products li.product > .price,
.shop-v2-main ul.products li.product > .star-rating,
.shop-v2-main ul.products li.product > h2 {
    display: none;
}

/* Show our product card */
.shop-v2-main ul.products li.product .product-card {
    display: block;
}

/* ========================================
   USP Bar
   ======================================== */
.shop-usp-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.shop-usp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.shop-usp-item strong {
    color: #047857;
}

/* Inline USP Bar (tussen producten) */
.shop-usp-bar-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 20px 0;
    margin: 24px 0;
    position: relative;
}

.shop-usp-bar-inline::before,
.shop-usp-bar-inline::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e5e7eb;
}

.shop-usp-bar-inline .shop-usp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.shop-usp-bar-inline .shop-usp-item strong {
    color: #047857;
}

/* ========================================
   Pagination
   ======================================== */
.shop-v2-main .pages {
    margin-top: 32px;
    text-align: right;
}

.pages .items {
    font-size: 0;
    letter-spacing: -1px;
    line-height: 0;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-flex;
    font-weight: 700;
    align-items: center;
}

.pages .item {
    font-size: 0.8125rem;
    line-height: 1;
    letter-spacing: normal;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 40px;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.pages .item:not(:last-of-type) {
    margin-right: 8px;
}

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

.pages .item.current {
    background-color: #f3f4f6;
    border: 1px solid #1f274a;
}

.pages strong.page,
.pages .item a.page {
    font-size: 0.8125rem;
    line-height: 1;
    color: #1f274a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    height: 100%;
    text-decoration: none;
}

.pages .item.current strong.page {
    font-weight: 600;
}

.pages .item a.page:hover {
    color: #1f274a;
}

.pages .item:hover {
    border-color: #1f274a;
}

.pages .item.pages-item-next {
    min-width: auto;
    padding: 0;
}

.pages .item.pages-item-next a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 100%;
}

/* No Products */
.shop-no-products {
    text-align: center;
    padding: 64px 24px;
    color: #6b7280;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1200px) {
    .shop-v2-main ul.products,
    .shop-v2-main .products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .shop-v2-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .shop-v2-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .filter-group {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .shop-v2-wrapper {
        padding: 24px 16px;
    }

    .shop-v2-sidebar {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .shop-header-top {
        flex-direction: column;
        gap: 16px;
    }

    .shop-header-left {
        flex-direction: column;
        gap: 8px;
    }

    .shop-title {
        font-size: 24px;
    }

    .shop-category-description-wrapper {
        flex-direction: column;
        gap: 16px;
    }

    .shop-partner-badge {
        align-self: flex-start;
    }

    .shop-v2-main ul.products,
    .shop-v2-main .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .shop-usp-bar {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .shop-v2-main ul.products,
    .shop-v2-main .products {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Product Card Component - Reusable
   ======================================== */
.product-card {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.product-card:hover {
    border-color: #d1d5db;
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Sale Badge */
.product-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    z-index: 2;
}

.product-card-badge.sale {
    background-color: #CB3024;
}

/* Product Image */
.product-card-image {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-height: 200px;
}

.product-card-image img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Stock Status */
.product-card-stock {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px 0;
}

.product-card-stock .stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
}

.product-card-stock.out-of-stock .stock-dot {
    background-color: #ef4444;
}

.product-card-stock .stock-text {
    font-size: 13px;
    font-weight: 500;
    color: #047857;
}

.product-card-stock.out-of-stock .stock-text {
    color: #ef4444;
}

/* Product Title */
.product-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 8px 16px 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

/* Rating & Delivery */
.product-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 12px;
    gap: 8px;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-card-stars {
    display: flex;
    gap: 1px;
}

.product-card-review-count {
    font-size: 12px;
    color: #6b7280;
}

.product-card-delivery {
    font-size: 11px;
    font-weight: 600;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Price & Cart Footer */
.product-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 12px 16px 16px;
    border-top: 1px solid #f3f4f6;
}

.product-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-card-old-price {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-card-current-price {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

/* Add to Cart Button */
.product-card-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #1bbc9b;
    color: #fff;
    border-radius: 6px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.product-card-add-to-cart:hover {
    background-color: #159a7f;
}

.product-card-add-to-cart svg {
    width: 20px;
    height: 20px;
}

/* Product Card Responsive */
@media (max-width: 768px) {
    .product-card-title {
        font-size: 14px;
        min-height: 40px;
    }

    .product-card-current-price {
        font-size: 18px;
    }

    .product-card-add-to-cart {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================
   Filter Info Button & Modal
   ========================================== */

.filter-info-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e7eb;
    border: none;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.filter-info-btn:hover {
    background: #2563eb;
    color: #fff;
}

.filter-header h3 {
    display: inline-flex;
    align-items: center;
}

/* Shop Modal */
.shop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.shop-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.shop-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.shop-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.shop-modal[aria-hidden="false"] .shop-modal-content {
    transform: scale(1);
}

.shop-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    transition: color 0.2s ease;
}

.shop-modal-close:hover {
    color: #111827;
}

.shop-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    padding-right: 32px;
}

.shop-modal-body {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}

.shop-modal-body p {
    margin: 0 0 12px 0;
}

.shop-modal-body ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.shop-modal-body li {
    margin-bottom: 8px;
}

.shop-modal-body strong {
    color: #111827;
}

/* ========================================
   Category SEO Content (onderaan pagina)
   ======================================== */
.category-seo-content {
    margin-top: 48px;
    padding-top: 32px;
}

.category-seo-content h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f274a;
    margin: 0 0 0.5rem 0 !important;
}

.category-seo-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f274a;
    margin: 2rem 0 0.75rem 0;
}

.category-seo-content p {
    font-size: 0.875rem;
    letter-spacing: 0px;
    line-height: 1.42857143;
    color: #1f274a;
    margin: 0 0 1rem 0;
}

.category-seo-content ul,
.category-seo-content ol {
    font-size: 0.875rem;
    letter-spacing: 0px;
    line-height: 1.42857143;
    color: #1f274a;
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.category-seo-content li {
    margin-bottom: 0.35rem;
}

.category-seo-content a {
    color: #047857;
    text-decoration: none;
}

.category-seo-content a:hover {
    text-decoration: underline;
}

/* ========================================
   Category Subcategories List (Alphabetical)
   ======================================== */
.category-subcategories {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.category-subcategories-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
}

.category-subcategories-group {
    min-width: 0;
}

.category-subcategories-letter {
    font-size: 1rem;
    font-weight: 700;
    color: #1f274a;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid #1bbc9b;
    display: inline-block;
}

.category-subcategories-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-subcategories-items li {
    margin-bottom: 0.375rem;
}

.category-subcategories-items a {
    color: #4b5563;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.category-subcategories-items a:hover {
    color: #047857;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .category-subcategories-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .category-subcategories-list {
        grid-template-columns: 1fr;
    }
}

/* Product Card in Blog Posts - Compact Version */
.product-card-single {
    display: inline-block;
    width: 180px !important;
    max-width: 180px !important;
    margin: 16px 20px 16px 0;
    vertical-align: top;
}

.product-card-single .product-card {
    font-size: 12px;
    border-radius: 6px;
}

.product-card-single .product-card-image {
    padding: 8px;
    min-height: auto !important;
    aspect-ratio: auto !important;
    height: 100px;
}

.product-card-single .product-card-image img {
    max-height: 85px !important;
    max-width: 100% !important;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-card-single .product-card-stock {
    margin: 4px 8px;
    font-size: 10px;
}

.product-card-single .stock-dot {
    width: 6px;
    height: 6px;
}

.product-card-single .product-card-title {
    font-size: 12px;
    padding: 0 8px;
    margin: 0;
    line-height: 1.3;
    min-height: 32px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-single .product-card-meta {
    padding: 4px 8px 8px;
}

.product-card-single .product-card-delivery {
    font-size: 9px;
    padding: 2px 6px;
}

.product-card-single .product-card-footer {
    padding: 8px;
}

.product-card-single .product-card-current-price {
    font-size: 14px;
    font-weight: 700;
}

.product-card-single .product-card-add-to-cart {
    width: 28px;
    height: 28px;
    padding: 6px;
}

.product-card-single .product-card-add-to-cart svg {
    width: 14px;
    height: 14px;
}

/* Hide rating in compact view */
.product-card-single .product-card-rating {
    display: none;
}

.product-cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.product-cards-grid .product-card-single {
    margin: 0;
}

/* Blog post context */
.single-post .product-card-single {
    float: left;
    margin: 0 20px 12px 0;
}

.single-post .product-cards-grid {
    margin: 20px 0;
    clear: both;
    float: none;
}

/* Gutenberg editor preview */
.product-card-preview .product-card-single,
.wp-block-licentie-product-card .product-card-single {
    width: 180px !important;
    max-width: 180px !important;
}

@media (max-width: 600px) {
    .single-post .product-card-single {
        float: none;
        display: block;
        margin: 16px auto;
    }
}
