/**
 * Iberlamit Catalog Styles
 * Compatible with Avada theme
 */

/* =============================================
   Variables
============================================= */
:root {
    --iberlamit-primary: #333333;
    --iberlamit-secondary: #666666;
    --iberlamit-accent: #d4a855;
    --iberlamit-success: #000000;
    --iberlamit-warning: #000000;
    --iberlamit-light: #f5f5f5;
    --iberlamit-border: #e0e0e0;
    --iberlamit-text: #333333;
    --iberlamit-text-light: #666666;
    --iberlamit-radius: 4px;
    --iberlamit-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --iberlamit-transition: all 0.3s ease;
}

/* =============================================
   Catalog Layout
============================================= */
.iberlamit-catalog {
    font-family: inherit;
    color: var(--iberlamit-text);
    line-height: 1.6;
}

.iberlamit-catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 991px) {
    .iberlamit-catalog-layout {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   Filters Sidebar
============================================= */
.iberlamit-filters {
    background: #fff;
    border: 0;
    border-radius: var(--iberlamit-radius);
    padding: 20px;
    position: sticky;
    top: 20px;
}

@media (max-width: 991px) {
    .iberlamit-filters {
        position: relative;
        top: 0;
    }
}

.iberlamit-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--iberlamit-border);
}

.iberlamit-filters-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.iberlamit-filters-clear {
    background: none;
    border: none;
    color: var(--iberlamit-secondary);
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    padding: 0;
}

.iberlamit-filters-clear:hover {
    color: var(--iberlamit-primary);
}

/* Filter Group with collapsible */
.iberlamit-filter-group {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--iberlamit-border);
    padding-bottom: 15px;
}

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

.iberlamit-filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
    user-select: none;
}

.iberlamit-filter-group-header h4 {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: var(--iberlamit-primary) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4 !important;
}

.iberlamit-filter-toggle {
    font-size: 18px;
    color: var(--iberlamit-secondary);
    transition: none;
    font-weight: normal;
    line-height: 1;
}

.iberlamit-filter-toggle::before {
    content: '−';
}

.iberlamit-filter-group.collapsed .iberlamit-filter-toggle::before {
    content: '+';
}

.iberlamit-filter-group.collapsed .iberlamit-filter-options {
    display: none;
}

.iberlamit-filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

/* Checkbox styling */
.iberlamit-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.iberlamit-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #000000;
}

.iberlamit-checkbox input[type="checkbox"]:checked {
    accent-color: #000000;
}

.iberlamit-checkbox span {
    color: var(--iberlamit-text);
}

.iberlamit-checkbox:hover span {
    color: var(--iberlamit-primary);
}

/* Uppercase for disponibilidad options */
.iberlamit-checkbox-uppercase span {
    text-transform: uppercase;
}

/* Search box - sin boton */
.iberlamit-search-box {
    display: block;
}

.iberlamit-search-box input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--iberlamit-border);
    border-radius: var(--iberlamit-radius);
    font-size: 14px;
    box-sizing: border-box;
}

.iberlamit-search-box input[type="text"]:focus {
    outline: none;
    border-color: var(--iberlamit-primary);
}

/* Hide search button */
.iberlamit-search-btn {
    display: none;
}

/* =============================================
   Products Grid
============================================= */
.iberlamit-products {
    min-height: 400px;
}

.iberlamit-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.iberlamit-products-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700 !important;
    color: #000;
}

.iberlamit-results-count {
    margin: 0;
    font-size: 14px;
    color: #000000;
    text-align: right;
}

/* Hide view toggle */
.iberlamit-view-toggle {
    display: none;
}

.iberlamit-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 1200px) {
    .iberlamit-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .iberlamit-products-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   Product Card
============================================= */
.iberlamit-product-card {
    background: #fff;
    border: 1px solid var(--iberlamit-border);
    border-radius: var(--iberlamit-radius);
    overflow: hidden;
    transition: var(--iberlamit-transition);
}

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

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

/* Product image - mantener proporcion */
.iberlamit-product-image {
    position: relative;
    background: var(--iberlamit-light);
    overflow: hidden;
}

.iberlamit-product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--iberlamit-transition);
}

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

.iberlamit-no-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--iberlamit-border);
}

.iberlamit-no-image .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

/* Badge */
.iberlamit-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--iberlamit-radius);
}

.iberlamit-badge-stock {
    background: #000000;
    color: #fff;
}

.iberlamit-badge-pedido {
    background: #000000;
    color: #fff;
}

.iberlamit-product-info {
    padding: 15px;
}

.iberlamit-product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--iberlamit-primary);
}

.iberlamit-product-type {
    margin: 0 0 5px 0 !important;
    font-size: 13px;
    color: var(--iberlamit-secondary);
}

.iberlamit-product-color-type {
    margin: 0 0 8px 0 !important;
    font-size: 12px;
    color: var(--iberlamit-text-light);
    text-transform: uppercase;
}

.iberlamit-product-info .iberlamit-badge {
    display: inline-block;
    margin-bottom: 8px;
}

/* Product dimensions in card */
.iberlamit-product-dimensions {
    margin: 8px 0 0 0;
    font-size: 11px;
    color: var(--iberlamit-text-light);
}

.iberlamit-product-dimensions strong {
    font-weight: 600;
    color: var(--iberlamit-text);
}

/* Hide btn-view */
.iberlamit-product-action {
    display: none;
}

.iberlamit-btn-view {
    display: none;
}

/* =============================================
   Pagination - Hidden (all products shown)
============================================= */
.iberlamit-pagination {
    display: none;
}

/* =============================================
   Loading State
============================================= */
.iberlamit-loading {
    text-align: center;
    padding: 40px;
}

.iberlamit-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--iberlamit-light);
    border-top-color: var(--iberlamit-primary);
    border-radius: 50%;
    animation: iberlamit-spin 0.8s linear infinite;
}

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

/* =============================================
   No Results
============================================= */
.iberlamit-no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--iberlamit-light);
    border-radius: var(--iberlamit-radius);
}

.iberlamit-no-results p {
    margin: 0;
    color: var(--iberlamit-secondary);
}

/* =============================================
   Single Product Page
============================================= */
.iberlamit-product-single {
    max-width: 1200px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
}

.iberlamit-product-single * {
    box-sizing: border-box;
}

/* Back to catalog link */
.iberlamit-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 8px 0;
    color: #000000;
    text-decoration: none;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--iberlamit-transition);
}

.iberlamit-back-link:hover {
    color: var(--iberlamit-secondary);
}

.iberlamit-back-arrow {
    font-size: 12px;
    line-height: 1;
}

.iberlamit-product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

@media (max-width: 991px) {
    .iberlamit-product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Gallery */
.iberlamit-product-gallery {
    position: sticky;
    top: 20px;
}

@media (max-width: 991px) {
    .iberlamit-product-gallery {
        position: relative;
        top: 0;
    }
}

.iberlamit-gallery-main {
    background: var(--iberlamit-light);
    border-radius: var(--iberlamit-radius);
    overflow: hidden;
    margin-bottom: 15px;
}

.iberlamit-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
}

/* Hide gallery thumbs */
.iberlamit-gallery-thumbs {
    display: none;
}

/* Image zoom overlay */
.iberlamit-gallery-main {
    position: relative;
    cursor: default;
}

/* Fullscreen icon */
.iberlamit-gallery-main::before {
    content: '';
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23000" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>') center/24px no-repeat;
    pointer-events: none;
    transition: var(--iberlamit-transition);
    opacity: 0.6;
}

/* AMPLIAR text */
.iberlamit-gallery-main::after {
    content: 'AMPLIAR';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: var(--iberlamit-transition);
}

.iberlamit-gallery-main:hover::before {
    opacity: 1;
}

.iberlamit-gallery-main:hover::after {
    opacity: 1;
}

.iberlamit-gallery-main:hover {
    cursor: pointer;
}

/* Details */
.iberlamit-product-details {
    padding-top: 10px;
}

.iberlamit-product-name {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 500;
    color: var(--iberlamit-primary);
}

/* Short description under product name */
.iberlamit-product-short-desc {
    margin: 0 0 25px 0;
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}

/* Meta info */
.iberlamit-product-meta {
    background: transparent;
    border-radius: var(--iberlamit-radius);
    padding: 0;
    margin-bottom: 25px;
}

.iberlamit-product-meta > div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: none;
}

.iberlamit-product-meta > div:last-child {
    padding-bottom: 0;
}

.iberlamit-product-meta > div:first-child {
    padding-top: 0;
}

.iberlamit-meta-label {
    font-size: 14px;
    color: var(--iberlamit-secondary);
    text-align: left;
}

.iberlamit-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--iberlamit-primary);
}

.iberlamit-badge-inline {
    background: #eeeeee;
    padding: 4px 10px;
    border-radius: var(--iberlamit-radius);
    border: none;
}

/* Dimensiones en lista vertical */
.iberlamit-meta-row-vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.iberlamit-dims-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
}

.iberlamit-dim-item {
    background: #eeeeee;
    padding: 4px 10px;
    border-radius: var(--iberlamit-radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--iberlamit-primary);
    width: fit-content;
    white-space: nowrap;
}

.iberlamit-meta-value.iberlamit-badge-inline.iberlamit-badge-stock,
.iberlamit-meta-value.iberlamit-badge-inline.iberlamit-badge-pedido {
    background: #eeeeee;
    color: #333;
    text-transform: uppercase;
}

/* Dimensions */
.iberlamit-dimensions {
    margin-bottom: 25px;
    padding: 10px 0;
}

.iberlamit-dimensions-label {
    margin: 0;
    font-size: 16px;
}

/* Actions */
.iberlamit-product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.iberlamit-btn {
    display: inline-block;
    padding: 14px 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: var(--iberlamit-radius);
    cursor: pointer;
    transition: var(--iberlamit-transition);
    border: none;
}

.iberlamit-btn-primary {
    background: var(--iberlamit-primary);
    color: #fff;
}

.iberlamit-btn-primary:hover {
    background: #000;
    color: #fff;
}

.iberlamit-btn-secondary {
    background: #fff;
    color: var(--iberlamit-primary);
    border: 1px solid var(--iberlamit-border);
}

.iberlamit-btn-secondary:hover {
    border-color: var(--iberlamit-primary);
    color: var(--iberlamit-primary);
}

.iberlamit-btn.iberlamit-btn-consulta,
.iberlamit-btn.iberlamit-btn-consulta.iberlamit-btn-list {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.iberlamit-btn.iberlamit-btn-consulta:hover,
.iberlamit-btn.iberlamit-btn-consulta.iberlamit-btn-list:hover {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

/* Expandable sections */
.iberlamit-product-sections {
    border-top: 1px solid var(--iberlamit-border);
}

.iberlamit-section {
    border-bottom: 1px solid var(--iberlamit-border);
}

.iberlamit-section summary {
    padding: 15px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.iberlamit-section summary::-webkit-details-marker {
    display: none;
}

.iberlamit-section summary::after {
    content: '+';
    font-size: 18px;
    color: var(--iberlamit-secondary);
}

.iberlamit-section[open] summary::after {
    content: '−';
}

.iberlamit-section-content {
    padding-bottom: 20px;
}

.iberlamit-section-content p {
    margin: 0;
    font-size: 14px;
    color: var(--iberlamit-secondary);
    line-height: 1.7;
}

.iberlamit-list {
    margin: 0;
    padding-left: 20px;
}

.iberlamit-list li {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--iberlamit-secondary);
}

/* =============================================
   Related Products
============================================= */
.iberlamit-related-products {
    border-top: 1px solid var(--iberlamit-border);
    padding-top: 40px;
}

.iberlamit-related-section {
    margin-bottom: 40px;
    position: relative;
}

.iberlamit-related-section:last-child {
    margin-bottom: 0;
}

.iberlamit-related-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
}

/* Carousel container with arrows */
.iberlamit-related-wrapper {
    position: relative;
    padding: 0 40px;
}

.iberlamit-related-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.iberlamit-related-carousel::-webkit-scrollbar {
    display: none;
}

/* Navigation arrows */
.iberlamit-carousel-arrow {
    position: absolute;
    top: calc(160px * 4 / 3 / 2);
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid var(--iberlamit-border);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--iberlamit-primary);
    transition: var(--iberlamit-transition);
    z-index: 10;
}

.iberlamit-carousel-arrow:hover {
    background: var(--iberlamit-primary);
    color: #fff;
    border-color: var(--iberlamit-primary);
}

.iberlamit-carousel-arrow.prev {
    left: 0;
}

.iberlamit-carousel-arrow.next {
    right: 0;
}

.iberlamit-related-item {
    flex: 0 0 160px;
    text-align: center;
    text-decoration: none;
    scroll-snap-align: start;
}

.iberlamit-related-item img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4 !important;
    object-fit: cover !important;
    border-radius: var(--iberlamit-radius);
    border: 2px solid var(--iberlamit-border);
    transition: var(--iberlamit-transition);
}

.iberlamit-related-item:hover img {
    border-color: var(--iberlamit-primary);
}

.iberlamit-related-color {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--iberlamit-text);
    font-weight: 600;
}

.iberlamit-related-dimensions {
    display: block;
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

.iberlamit-related-availability {
    display: inline-block;
    font-size: 9px;
    color: #fff;
    background: #000;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 4px;
    text-transform: uppercase;
}

/* =============================================
   Image Lightbox Modal with Zoom
============================================= */
.iberlamit-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    flex-direction: column;
}

.iberlamit-lightbox.active {
    display: flex;
}

.iberlamit-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.iberlamit-lightbox-container {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1;
}

.iberlamit-lightbox img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

/* Close button - hidden, now integrated in controls */
.iberlamit-lightbox-close {
    display: none;
}

/* Zoom Controls */
.iberlamit-lightbox-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 30px;
    z-index: 10;
}

.iberlamit-zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.iberlamit-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.iberlamit-zoom-btn:active {
    background: rgba(255, 255, 255, 0.35);
}

.iberlamit-zoom-level {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.iberlamit-zoom-reset {
    margin-left: 8px;
    font-size: 18px;
}

.iberlamit-zoom-close {
    margin-left: 8px;
    background: rgba(255, 100, 100, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.iberlamit-zoom-close:hover,
.iberlamit-zoom-close:active {
    background: rgba(255, 100, 100, 0.5);
}

/* Zoom Hint */
.iberlamit-lightbox-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

/* Mobile adjustments for lightbox */
@media (max-width: 768px) {
    .iberlamit-lightbox img {
        max-width: 95%;
        max-height: 80%;
    }

    .iberlamit-lightbox-controls {
        bottom: 15px;
        padding: 6px 12px;
        gap: 6px;
    }

    .iberlamit-zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .iberlamit-zoom-level {
        font-size: 12px;
        min-width: 40px;
    }

    .iberlamit-lightbox-hint {
        bottom: 70px;
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* =============================================
   Variants Modal
============================================= */
.iberlamit-variants-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.iberlamit-variants-modal.active {
    display: flex;
}

.iberlamit-variants-content {
    background: #fff;
    border-radius: var(--iberlamit-radius);
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.iberlamit-variants-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #000;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.iberlamit-variants-close:hover {
    background: #f5f5f5;
}

.iberlamit-variants-grid {
    padding: 0;
}

/* Split View Layout */
.iberlamit-variants-split {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 400px;
}

.iberlamit-variants-image {
    background: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--iberlamit-border);
}

.iberlamit-variants-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.iberlamit-variants-color-info {
    padding: 20px;
    text-align: center;
}

.iberlamit-variants-color-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--iberlamit-dark);
}

.iberlamit-variants-product-name {
    font-size: 13px;
    color: var(--iberlamit-secondary);
    margin: 0;
}

.iberlamit-variants-list {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

.iberlamit-variants-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iberlamit-variant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--iberlamit-border);
    border-radius: var(--iberlamit-radius);
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: var(--iberlamit-transition);
}

.iberlamit-variant-row:hover {
    border-color: var(--iberlamit-primary);
    background: var(--iberlamit-light);
}

.iberlamit-variant-row-dims {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.iberlamit-variant-dimension {
    font-size: 15px;
    font-weight: 600;
    color: var(--iberlamit-dark);
}

.iberlamit-variant-row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.iberlamit-variant-badge {
    display: inline-block;
    font-size: 10px;
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    width: fit-content;
}

.iberlamit-variant-badge.iberlamit-badge-stock {
    background: var(--iberlamit-success);
    width: fit-content;
}

.iberlamit-variant-arrow {
    font-size: 18px;
    color: var(--iberlamit-secondary);
    transition: var(--iberlamit-transition);
}

.iberlamit-variant-row:hover .iberlamit-variant-arrow {
    color: var(--iberlamit-primary);
    transform: translateX(3px);
}

/* Legacy card styles (keep for backwards compatibility) */
.iberlamit-variant-card {
    border: 1px solid var(--iberlamit-border);
    border-radius: var(--iberlamit-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--iberlamit-transition);
}

.iberlamit-variant-card:hover {
    box-shadow: var(--iberlamit-shadow);
}

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

.iberlamit-variant-info {
    padding: 12px;
}

.iberlamit-variant-color {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.iberlamit-variant-dims {
    font-size: 11px;
    color: #999;
    margin: 0 0 5px 0;
}

/* =============================================
   Error message
============================================= */
.iberlamit-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px 20px;
    border-radius: var(--iberlamit-radius);
    margin: 20px 0;
}

/* =============================================
   RESPONSIVE - Tablet (max-width: 991px)
============================================= */
@media (max-width: 991px) {
    /* Variants Split View */
    .iberlamit-variants-split {
        grid-template-columns: 1fr;
    }

    .iberlamit-variants-image {
        border-right: none;
        border-bottom: 1px solid var(--iberlamit-border);
    }

    .iberlamit-variants-image img {
        height: 200px;
    }

    .iberlamit-variants-list {
        max-height: 50vh;
    }

    /* Catalog */
    .iberlamit-catalog-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .iberlamit-filters {
        position: relative;
        top: 0;
    }

    .iberlamit-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Single Product */
    .iberlamit-product-single {
        padding: 0 15px;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .iberlamit-product-main {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 40px;
        max-width: 100%;
    }

    .iberlamit-product-gallery {
        position: relative;
        top: 0;
        max-width: 100%;
    }

    .iberlamit-gallery-main {
        max-width: 100%;
    }

    .iberlamit-gallery-main img {
        max-width: 100%;
        height: auto;
    }

    .iberlamit-product-details {
        max-width: 100%;
        overflow-x: hidden;
    }

    .iberlamit-product-name {
        font-size: 24px;
        margin-bottom: 20px;
        word-break: break-word;
    }

    .iberlamit-product-meta {
        padding: 15px;
        max-width: 100%;
    }

    .iberlamit-product-meta > div {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .iberlamit-product-meta > div .iberlamit-meta-label {
        flex-shrink: 0;
        min-width: 100px;
    }

    .iberlamit-product-meta > div .iberlamit-meta-value {
        text-align: right;
    }

    /* Dimensiones: mantener vertical con label arriba */
    .iberlamit-product-meta > div.iberlamit-meta-row-vertical {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .iberlamit-product-meta > div.iberlamit-meta-row-vertical .iberlamit-meta-value {
        text-align: left;
    }

    .iberlamit-dimensions-list {
        flex-direction: column;
    }

    .iberlamit-product-actions {
        flex-direction: column;
        gap: 10px;
    }

    .iberlamit-product-actions .iberlamit-btn {
        width: 100%;
        text-align: center;
    }

    .iberlamit-related-products {
        padding-top: 30px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .iberlamit-related-title {
        font-size: 16px;
    }
}

/* =============================================
   RESPONSIVE - Mobile (max-width: 600px)
============================================= */
@media (max-width: 600px) {
    /* Variants Split View */
    .iberlamit-variants-split {
        min-height: auto;
    }

    .iberlamit-variants-image img {
        height: 150px;
    }

    .iberlamit-variants-color-info {
        padding: 15px;
    }

    .iberlamit-variants-color-name {
        font-size: 16px;
    }

    .iberlamit-variants-list {
        padding: 15px;
        max-height: 40vh;
    }

    .iberlamit-variant-row {
        padding: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .iberlamit-variant-row-meta {
        width: 100%;
        justify-content: space-between;
    }

    /* Catalog */
    .iberlamit-catalog {
        padding: 0 10px;
    }

    .iberlamit-catalog-layout {
        gap: 15px;
    }

    .iberlamit-filters {
        padding: 15px;
    }

    .iberlamit-filters-header h3 {
        font-size: 16px;
    }

    .iberlamit-filter-group {
        margin-bottom: 15px;
    }

    .iberlamit-filter-group-header h4 {
        font-size: 12px;
    }

    .iberlamit-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .iberlamit-products-header {
        justify-content: flex-end;
    }

    /* Single Product */
    .iberlamit-product-single {
        padding: 0 10px;
    }

    .iberlamit-back-link {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .iberlamit-product-main {
        gap: 20px;
        margin-bottom: 30px;
    }

    .iberlamit-product-name {
        font-size: 20px;
        margin-bottom: 15px;
        word-break: break-word;
    }

    .iberlamit-gallery-thumbs {
        gap: 8px;
    }

    .iberlamit-thumb {
        width: 60px;
        height: 60px;
    }

    .iberlamit-product-meta {
        padding: 12px;
        margin-bottom: 20px;
    }

    .iberlamit-product-meta > div {
        padding: 8px 0;
    }

    .iberlamit-meta-label,
    .iberlamit-meta-value {
        font-size: 13px;
    }

    .iberlamit-dimensions-label {
        font-size: 14px;
    }

    .iberlamit-btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    .iberlamit-product-actions {
        margin-bottom: 25px;
    }

    .iberlamit-section summary {
        font-size: 13px;
        padding: 12px 0;
    }

    .iberlamit-section-content {
        padding-bottom: 15px;
    }

    .iberlamit-section-content p,
    .iberlamit-list li {
        font-size: 13px;
    }

    /* Related Products */
    .iberlamit-related-products {
        padding-top: 25px;
    }

    .iberlamit-related-section {
        margin-bottom: 25px;
    }

    .iberlamit-related-title {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .iberlamit-related-carousel {
        gap: 10px;
    }

    .iberlamit-related-item {
        flex: 0 0 100px;
    }

    .iberlamit-related-color {
        font-size: 11px;
    }
}

/* =============================================
   RESPONSIVE - Small Mobile (max-width: 400px)
============================================= */
@media (max-width: 400px) {
    .iberlamit-product-name {
        font-size: 18px;
    }

    .iberlamit-thumb {
        width: 50px;
        height: 50px;
    }

    .iberlamit-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .iberlamit-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .iberlamit-related-item {
        flex: 0 0 calc(50% - 5px);
    }
}

/* =============================================
   Mobile Filters Button
============================================= */
.iberlamit-filters-toggle-btn {
    display: none;
    width: 100%;
    padding: 12px 20px;
    background: var(--iberlamit-primary);
    color: #fff;
    border: none;
    border-radius: var(--iberlamit-radius);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-bottom: 15px;
}

/* Mobile drawer backdrop */
.iberlamit-filters-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.iberlamit-filters-backdrop.active {
    display: block;
    opacity: 1;
}

/* Mobile drawer close button */
.iberlamit-filters-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: var(--iberlamit-light);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--iberlamit-text);
}

.iberlamit-filters-close:hover {
    background: var(--iberlamit-border);
}

@media (max-width: 991px) {
    .iberlamit-filters-toggle-btn {
        display: block;
    }

    .iberlamit-filters {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: #fff;
        padding: 60px 20px 20px;
        z-index: 9999;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .iberlamit-filters.active {
        transform: translateX(0);
    }

    .iberlamit-filters-close {
        display: block;
    }
}


/* =============================================
   Mobile Carousel - 2.5 images visible
============================================= */
@media (max-width: 991px) {
    .iberlamit-related-wrapper {
        padding: 0;
    }

    .iberlamit-carousel-arrow {
        display: none;
    }

    .iberlamit-related-carousel {
        gap: 10px;
        padding-bottom: 15px;
        scroll-padding-left: 0;
    }

    .iberlamit-related-item {
        flex: 0 0 calc(40% - 5px);
        min-width: 120px;
    }
}

@media (max-width: 600px) {
    .iberlamit-related-item {
        flex: 0 0 calc(45% - 5px);
        min-width: 100px;
    }
}

/* =============================================
   Variant Product Style
============================================= */
.iberlamit-variant-product {
    font-size: 12px;
    color: var(--iberlamit-secondary);
    margin: 0 0 3px 0;
}

/* =============================================
   Avada Compatibility - Hide unwanted elements on product pages
============================================= */
body.page .iberlamit-product-single ~ .fusion-page-title-bar,
body.page .fusion-page-title-bar:has(+ * .iberlamit-product-single),
.iberlamit-product-single .fusion-page-title-bar,
.iberlamit-product-single .fusion-page-title-wrapper {
    display: none !important;
}

/* Ensure product page uses full width */
.iberlamit-product-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hide featured image that might appear on product pages */
.post-type-page.single .fusion-featured-image-wrapper:has(+ .iberlamit-product-single) {
    display: none !important;
}

/* =============================================
   Selection List - Fixed Bottom Bar
============================================= */
.iberlamit-list-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000000;
    z-index: 9990;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.iberlamit-list-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.iberlamit-list-bar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.iberlamit-list-bar-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.iberlamit-list-bar-text {
    flex: 1;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.iberlamit-list-bar-text #iberlamit-list-count {
    font-weight: 700;
    font-size: 17px;
}

.iberlamit-list-bar-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--iberlamit-transition);
    flex-shrink: 0;
}

.iberlamit-list-bar-btn:hover {
    background: #ffffff;
    color: #000000;
}

/* =============================================
   Selection List - Panel/Modal
============================================= */
.iberlamit-list-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99997;
}

.iberlamit-list-panel.active {
    display: block;
}

.iberlamit-list-panel-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.iberlamit-list-panel-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.iberlamit-list-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--iberlamit-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.iberlamit-list-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.iberlamit-list-panel-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--iberlamit-secondary);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iberlamit-list-panel-close:hover {
    color: var(--iberlamit-primary);
}

.iberlamit-list-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.iberlamit-list-panel-empty {
    display: none;
    flex: 1;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--iberlamit-secondary);
}

.iberlamit-list-panel-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--iberlamit-border);
    display: none;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    background: var(--iberlamit-light);
}

/* =============================================
   Selection List - Item Card
============================================= */
.iberlamit-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--iberlamit-light);
    border-radius: var(--iberlamit-radius);
    margin-bottom: 10px;
}

.iberlamit-list-item:last-child {
    margin-bottom: 0;
}

.iberlamit-list-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--iberlamit-radius);
    flex-shrink: 0;
}

.iberlamit-list-item-info {
    flex: 1;
    min-width: 0;
}

.iberlamit-list-item-name {
    display: block;
    font-weight: 600;
    color: var(--iberlamit-primary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iberlamit-list-item-name:hover {
    text-decoration: underline;
}

.iberlamit-list-item-product {
    font-size: 12px;
    color: var(--iberlamit-secondary);
}

.iberlamit-list-item-remove {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--iberlamit-secondary);
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--iberlamit-transition);
}

.iberlamit-list-item-remove:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* =============================================
   Selection List - Add Button (Product Page)
============================================= */
.iberlamit-btn-list {
    background: #fff;
    color: var(--iberlamit-primary);
    border: 1px solid var(--iberlamit-border);
}

.iberlamit-btn-list:hover {
    border-color: var(--iberlamit-primary);
}

.iberlamit-btn-list .iberlamit-btn-list-remove {
    display: none;
}

.iberlamit-btn-list.in-list {
    background: var(--iberlamit-primary);
    color: #fff;
    border: 1px solid var(--iberlamit-primary);
}

.iberlamit-btn-list.in-list .iberlamit-btn-list-add {
    display: none;
}

.iberlamit-btn-list.in-list .iberlamit-btn-list-remove {
    display: inline;
}

/* Outline button for clear list */
.iberlamit-btn-outline {
    background: transparent;
    color: var(--iberlamit-secondary);
    border: 1px solid var(--iberlamit-border);
}

.iberlamit-btn-outline:hover {
    background: var(--iberlamit-light);
    border-color: var(--iberlamit-secondary);
}

/* =============================================
   Selection List - Mobile Adjustments
============================================= */
@media (max-width: 600px) {
    .iberlamit-list-bar-content {
        padding: 10px 15px;
        gap: 10px;
    }

    .iberlamit-list-bar-icon svg {
        width: 20px;
        height: 20px;
    }

    .iberlamit-list-bar-text {
        font-size: 13px;
    }

    .iberlamit-list-bar-text #iberlamit-list-count {
        font-size: 15px;
    }

    .iberlamit-list-bar-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .iberlamit-list-panel-content {
        max-width: 100%;
    }

    .iberlamit-list-panel-header {
        padding: 15px;
    }

    .iberlamit-list-panel-header h3 {
        font-size: 16px;
    }

    .iberlamit-list-panel-body {
        padding: 10px;
    }

    .iberlamit-list-item {
        padding: 10px;
        gap: 10px;
    }

    .iberlamit-list-item-img {
        width: 50px;
        height: 50px;
    }

    .iberlamit-list-item-name {
        font-size: 13px;
    }

    .iberlamit-list-panel-footer {
        padding: 12px 15px;
    }

    .iberlamit-list-panel-footer .iberlamit-btn {
        padding: 12px 16px;
        font-size: 12px;
    }
}

/* =============================================
   Avada "Back to Top" Button Override
============================================= */

/* Centrar el botón en el catálogo */
body.iberlamit-is-catalog .fusion-top-top-link {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
}

/* Ocultar en la ficha de producto */
body.iberlamit-is-product-single .fusion-top-top-link {
    display: none !important;
}

/* =============================================
   SEO Content Section
============================================= */
.iberlamit-seo-content {
    margin-top: 60px;
    padding: 40px;
    background: transparent;
    border-radius: var(--iberlamit-radius);
}

.iberlamit-seo-content .fusion-responsive-typography-calculated {
    font-weight: 700 !important;
}

.iberlamit-seo-content h2 {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--iberlamit-primary);
}

.iberlamit-seo-content p {
    margin: 0 0 15px 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--iberlamit-secondary);
}

.iberlamit-seo-content p:last-child {
    margin-bottom: 0;
}

.iberlamit-seo-content strong {
    color: var(--iberlamit-primary);
    font-weight: 600;
}

/* Product Single SEO Content */
.iberlamit-product-seo-content {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--iberlamit-border);
}

.iberlamit-product-seo-content h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--iberlamit-primary);
}

.iberlamit-product-seo-content .fusion-responsive-typography-calculated {
    font-weight: 700 !important;
}

.iberlamit-product-seo-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--iberlamit-secondary);
}

.iberlamit-product-seo-content strong {
    color: var(--iberlamit-primary);
    font-weight: 600;
}

@media (max-width: 991px) {
    .iberlamit-seo-content {
        margin-top: 40px;
        padding: 30px;
    }

    .iberlamit-seo-content h2 {
        font-size: 20px;
    }

    .iberlamit-seo-content p {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .iberlamit-seo-content {
        margin-top: 30px;
        padding: 20px;
    }

    .iberlamit-seo-content h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .iberlamit-seo-content p {
        font-size: 13px;
        margin-bottom: 12px;
    }
}
