/* ========================================
   ELESSI-INSPIRED PRODUCT STYLES
   Author: Anas
   Clean minimal design like Elessi theme
======================================== */

/* ========================================
   PRODUCT IMAGES - CLEAN STYLE
======================================== */

.product-swiper .field--name-field-iamge img,
.view-hproducts .views-field-field-iamge img,
.view-category-page .views-field-field-iamge img,
.page-taxonomy-term .views-field-field-iamge img,
.categories-carousal .views-field-field-image img,
.view--category-menu .views-field-field-iamge img,
.path-store .field--name-field-iamge img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.product-swiper .field--name-field-iamge,
.view-hproducts .views-field-field-iamge,
.view-category-page .views-field-field-iamge,
.page-taxonomy-term .views-field-field-iamge,
.view--category-menu .views-field-field-iamge,
.path-store .field--name-field-iamge {
    background: #fff !important;
    border-radius: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    margin-bottom: 10px !important;
    height: 250px !important;
}

/* Store page specific image adjustments */
.path-store .field--name-field-iamge {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.path-store .field--name-field-iamge img {
    object-fit: contain !important;
    background-color: #fff !important;
}

/* Ensure anchor tag fills the container */
.product-swiper .field--name-field-iamge a,
.view-hproducts .views-field-field-iamge a,
.view-category-page .views-field-field-iamge a,
.page-taxonomy-term .views-field-field-iamge a,
.view--category-menu .views-field-field-iamge a,
.path-store .field--name-field-iamge a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* ========================================
   PRODUCT CARDS - MINIMAL CLEAN DESIGN
======================================== */

.product-swiper .views-row,
.view-hproducts .views-col,
.view-category-page .views-row,
.page-taxonomy-term .views-row,
.view--category-menu .views-row {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

/* ========================================
   PRODUCT GRID SPACING
======================================== */

.view-category-page .view-content,
.page-taxonomy-term .view-content {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    margin-top: 40px !important;
    padding: 0 20px !important;
}

.view--category-menu .view-content.category-product-grid {
    display: flex !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 1rem 20px !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

.view--category-menu .views-row {
    flex: 0 1 calc(25% - 23px) !important;
    margin: 0 !important;
}

.view-hproducts .view-content {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    padding: 0 20px !important;
}

/* ========================================
   PRODUCT TITLES - ELESSI STYLE
======================================== */

.product-swiper .field--name-title,
.view-hproducts .views-field-title,
.view-category-page .views-field-title,
.page-taxonomy-term .views-field-title,
.view--category-menu .views-field-title {
    margin-bottom: 5px !important;
    margin-top: 10px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #333 !important;
    text-align: center !important;
    letter-spacing: 0px !important;
    line-height: 1.4 !important;
}

.product-swiper .field--name-title a,
.view-hproducts .views-field-title a,
.view-category-page .views-field-title a,
.page-taxonomy-term .views-field-title a,
.view--category-menu .views-field-title a {
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.product-swiper .field--name-title a:hover,
.view-hproducts .views-field-title a:hover,
.view-category-page .views-field-title a:hover,
.page-taxonomy-term .views-field-title a:hover,
.view--category-menu .views-field-title a:hover {
    color: #000 !important;
}

/* ========================================
   PRICE TAGS - ELESSI STYLE
======================================== */

.product-swiper .field--name-price,
.product-swiper .field--name-price .field__item,
.view-hproducts .views-field-price__number,
.view-hproducts .views-field-price__number .field-content,
.view-category-page .views-field-price__number,
.page-taxonomy-term .views-field-price__number,
.view--category-menu .views-field-price__number,
.commerce-price-formatted {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #000 !important;
    text-align: center !important;
    margin: 5px 0 10px 0 !important;
    display: block !important;
}

/* ========================================
   ADD TO CART BUTTONS - COMPACT SINGLE LINE
======================================== */

.view-category-page .views-field-add-to-cart,
.page-taxonomy-term .views-field-add-to-cart,
.view--category-menu .views-field-add-to-cart,
.view-hproducts .views-field-add-to-cart,
.product-swiper .views-field-add-to-cart,
.product-swiper .views-field-variations-target-id {
    display: block !important;
    margin: 10px 0 !important;
    text-align: center !important;
}

/* Compact Add to Cart Button */
.view--category-menu .views-field-add-to-cart form,
.view-hproducts .views-field-add-to-cart form,
.view-category-page .views-field-add-to-cart form,
.page-taxonomy-term .views-field-add-to-cart form,
.product-swiper .views-field-variations-target-id form,
.product-swiper .commerce-order-item-add-to-cart-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

/* Product Image Hover Effect */
.product-swiper .swiper-slide:hover img,
.view-hproducts .views-col:hover img,
.view-category-page .views-row:hover img,
.page-taxonomy-term .views-row:hover img,
.view--category-menu .views-row:hover img {
    transform: scale(1.03) !important;
}

/* ========================================
   PRODUCT DETAIL PAGE - ELESSI STYLE
======================================== */

.node--type-product,
.page-node-type-product .node--type-product {
    max-width: 1400px !important;
    margin: 40px auto !important;
    padding: 0 40px !important;
}

.node--type-product .node__content {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 60px !important;
    align-items: start !important;
}

/* Product Image - Left Side */
.node--type-product .field--name-field-iamge {
    grid-column: 1 !important;
    position: sticky !important;
    top: 100px !important;
    background: #fff !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    height: auto !important;
    max-height: 600px !important;
}

.node--type-product .field--name-field-iamge img {
    width: 100% !important;
    height: 600px !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

/* Product Info - Right Side */
.node--type-product .field--name-title,
.node--type-product h1.page-title {
    grid-column: 2 !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0 0 15px 0 !important;
    line-height: 1.3 !important;
    letter-spacing: 0px !important;
}

.node--type-product .field--name-field-price,
.node--type-product .commerce-product-variation-cart-form .price {
    grid-column: 2 !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    color: #000 !important;
    margin: 0 0 20px 0 !important;
    text-align: left !important;
}

.node--type-product .field--name-field-price .field__label {
    display: none !important;
}

.node--type-product .field--name-body {
    grid-column: 2 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    color: #666 !important;
    margin-bottom: 25px !important;
}

.node--type-product .field--name-body .field__label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #000 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 10px !important;
    display: block !important;
}

/* Add to Cart Form - Elessi Style */
.node--type-product .commerce-product-variation-cart-form,
.node--type-product .field--name-variations {
    grid-column: 2 !important;
    margin-top: 20px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.node--type-product .form-item-quantity {
    margin-bottom: 15px !important;
}

.node--type-product .form-item-quantity label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #000 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 8px !important;
    display: block !important;
}

.node--type-product input[type="number"],
.node--type-product .form-number {
    width: 70px !important;
    padding: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    text-align: center !important;
    transition: border-color 0.3s ease !important;
}

.node--type-product input[type="number"]:focus {
    border-color: #000 !important;
    outline: none !important;
}

/* Add to Cart Button - Elessi Teal Color */
.node--type-product .commerce-product-variation-cart-form input[type="submit"],
.node--type-product .form-submit[value*="Add to cart"] {
    width: 100% !important;
    padding: 15px 35px !important;
    background: #4ECDC4 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 15px 0 0 0 !important;
    display: block !important;
    text-align: center !important;
}

.node--type-product .commerce-product-variation-cart-form input[type="submit"]:hover {
    background: #3DBDB4 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3) !important;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {

    .view-category-page .view-content,
    .page-taxonomy-term .view-content,
    .view-hproducts .view-content {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 25px !important;
    }

    .view--category-menu .views-row {
        flex: 0 1 calc(33.333% - 17px) !important;
    }

    .node--type-product .node__content {
        gap: 40px !important;
    }

    .node--type-product .field--name-field-iamge img {
        height: 500px !important;
    }
}

@media (max-width: 768px) {

    .product-swiper .field--name-field-iamge img,
    .view-hproducts .views-field-field-iamge img,
    .view-category-page .views-field-field-iamge img,
    .page-taxonomy-term .views-field-field-iamge img,
    .view--category-menu .views-field-field-iamge img {
        height: 300px !important;
    }

    .product-swiper .field--name-field-iamge,
    .view-hproducts .views-field-field-iamge,
    .view-category-page .views-field-field-iamge,
    .page-taxonomy-term .views-field-field-iamge,
    .view--category-menu .views-field-field-iamge,
    .path-store .field--name-field-iamge {
        height: 300px !important;
    }

    .view-category-page .view-content,
    .page-taxonomy-term .view-content,
    .view-hproducts .view-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .view--category-menu .views-row {
        flex: 0 1 calc(50% - 10px) !important;
    }

    .node--type-product,
    .page-node-type-product .node--type-product {
        padding: 0 20px !important;
        margin: 20px auto !important;
    }

    .node--type-product .node__content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .node--type-product .field--name-field-iamge,
    .node--type-product .field--name-title,
    .node--type-product h1.page-title,
    .node--type-product .field--name-field-price,
    .node--type-product .field--name-body,
    .node--type-product .commerce-product-variation-cart-form,
    .node--type-product .field--name-variations {
        grid-column: 1 !important;
    }

    .node--type-product .field--name-field-iamge {
        position: relative !important;
        top: 0 !important;
        max-height: 400px !important;
    }

    .node--type-product .field--name-field-iamge img {
        height: 400px !important;
    }
}

@media (max-width: 576px) {

    .product-swiper .field--name-field-iamge img,
    .view-hproducts .views-field-field-iamge img,
    .view-category-page .views-field-field-iamge img,
    .page-taxonomy-term .views-field-field-iamge img,
    .view--category-menu .views-field-field-iamge img {
        height: 250px !important;
    }

    .product-swiper .field--name-field-iamge,
    .view-hproducts .views-field-field-iamge,
    .view-category-page .views-field-field-iamge,
    .page-taxonomy-term .views-field-field-iamge,
    .view--category-menu .views-field-field-iamge,
    .path-store .field--name-field-iamge {
        height: 250px !important;
    }

    .view-category-page .view-content,
    .page-taxonomy-term .view-content,
    .view-hproducts .view-content {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .view--category-menu .views-row {
        flex: 0 1 100% !important;
    }

    .node--type-product .field--name-field-iamge {
        max-height: 300px !important;
    }

    .node--type-product .field--name-field-iamge img {
        height: 300px !important;
    }

    .node--type-product .field--name-title,
    .node--type-product h1.page-title {
        font-size: 22px !important;
    }

    .node--type-product .field--name-field-price {
        font-size: 20px !important;
    }
}

/* ========================================
   COLOR SWATCHES & SIZE SELECTORS - ELESSI STYLE
======================================== */

/* Attribute fields container */
.commerce-product-variation-attributes,
.field--name-attribute-color,
.field--name-attribute-size {
    margin: 20px 0 !important;
}

/* Color attribute label */
.field--name-attribute-color>label,
.field--name-attribute-color .fieldset-legend,
.form-item-purchased-entity-0-attributes-attribute-color>label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #000 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 12px !important;
    display: block !important;
}

/* Color swatches container */
.field--name-attribute-color .form-radios,
.form-item-purchased-entity-0-attributes-attribute-color .form-radios {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

/* ========================================
   SWIPER NAVIGATION (Migrated from style.css)
======================================== */

.product-swiper .swiper-button-next,
.product-swiper .swiper-button-prev,
.product-next,
.product-prev {
    position: absolute !important;
    top: 40% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 999 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.product-swiper .swiper-button-prev,
.product-prev {
    left: 0 !important;
}

.product-swiper .swiper-button-next,
.product-next {
    right: 0 !important;
}

.product-swiper .swiper-button-next:hover,
.product-swiper .swiper-button-prev:hover {
    background: #000 !important;
    color: #fff !important;
}

.product-swiper .swiper-button-next::after,
.product-swiper .swiper-button-prev::after {
    font-size: 16px !important;
}

/* ========================================
   CATEGORIES CAROUSEL (Migrated from style.css)
======================================== */

.categories-carousal .views-view-responsive-grid--horizontal,
.categories-carousal .categories-swiper,
.categories-carousal .swiper {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.categories-carousal .swiper-wrapper {
    display: contents !important;
}

.categories-carousal .swiper-slide,
.categories-carousal .views-view-responsive-grid__item {
    padding: 0 !important;
    width: auto !important;
    margin: 0 !important;
}

.categories-next,
.categories-prev,
.categories-carousal .swiper-button-next,
.categories-carousal .swiper-button-prev {
    display: none !important;
}

.categories-carousal .views-view-responsive-grid__item-inner {
    text-align: center !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.categories-carousal .views-field-field-image {
    background: #fff !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
    position: relative !important;
}

.categories-carousal .views-field-field-image .field-content {
    height: 350px !important;
    overflow: hidden !important;
}

.categories-carousal .views-field-field-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
}

.categories-carousal .views-view-responsive-grid__item-inner:hover img {
    transform: scale(1.05) !important;
}

.categories-carousal .views-field-field-discount,
.categories-carousal .views-field-name {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #000 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 15px !important;
}

/* Professional View All Button */
.categories-carousal .views-field-nothing {
    margin-top: 10px !important;
}

.categories-carousal .views-field-nothing a {
    display: inline-block !important;
    padding: 10px 28px !important;
    background-color: transparent !important;
    color: #000 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.categories-carousal .views-field-nothing a::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background-color: #000 !important;
    transition: left 0.3s ease !important;
    z-index: -1 !important;
}

.categories-carousal .views-field-nothing a:hover {
    color: #fff !important;
}

.categories-carousal .views-field-nothing a:hover::before {
    left: 0 !important;
}

/* ========================================
   VISUAL FIXES
======================================== */

/* Fix 1: Remove unwanted backgrounds */
.product-swiper .views-row,
.view-hproducts .views-col,
.view-category-page .views-row,
.page-taxonomy-term .views-row,
.view--category-menu .views-row {
    background: transparent !important;
    /* Changed from white to transparent to avoid boxy look */
    box-shadow: none !important;
    border: none !important;
}

.product-swiper .field--name-field-iamge,
.view-hproducts .views-field-field-iamge,
.categories-carousal .views-field-field-image {
    background: transparent !important;
}

/* Fix 2: Price Styling - Bold & Black */
.product-swiper .field--name-price,
.view-hproducts .views-field-price__number,
.view-category-page .views-field-price__number,
.commerce-price-formatted {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    text-align: center !important;
    margin: 10px 0 !important;
    display: block !important;
}

/* Fix 3: Add to Cart - Always Visible */
.view-category-page .views-field-add-to-cart,
.view-hproducts .views-field-add-to-cart,
.product-swiper .views-field-add-to-cart,
.product-swiper .views-field-variations-target-id {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 10px !important;
}

.product-swiper .commerce-order-item-add-to-cart-form input[type="submit"],
.view-hproducts .commerce-order-item-add-to-cart-form input[type="submit"] {
    background-color: #000 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}

.product-swiper .commerce-order-item-add-to-cart-form input[type="submit"]:hover,
.view-hproducts .commerce-order-item-add-to-cart-form input[type="submit"]:hover {
    background-color: #4ECDC4 !important;
}

/* Fix 4: View All Button */
.view-display-id-block_1 .more-link,
.view-hproducts .more-link,
.categories-carousal .more-link {
    text-align: center !important;
    margin-top: 30px !important;
    display: block !important;
}

.view-display-id-block_1 .more-link a,
.view-hproducts .more-link a,
.categories-carousal .more-link a {
    display: inline-block !important;
    padding: 12px 40px !important;
    background: transparent !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    letter-spacing: 2px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.view-display-id-block_1 .more-link a:hover,
.view-hproducts .more-link a:hover,
.categories-carousal .more-link a:hover {
    background: #000 !important;
    color: #fff !important;
}

/* ========================================
   FIX 5: CATEGORY PAGE GRID OVERRIDE
======================================== */

/* Reset Drupal's default grid styles */
.view--category-menu .views-view-grid,
.view--category-menu .views-row,
.view--category-menu .views-col {
    display: block !important;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Create a proper CSS Grid */
.view--category-menu .views-view-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
}

/* Style the individual product cards */
.view--category-menu .views-col {
    background: transparent !important;
    margin-bottom: 0 !important;
}

/* Responsive Grid */
@media (max-width: 992px) {
    .view--category-menu .views-view-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .view--category-menu .views-view-grid {
        grid-template-columns: repeat(1, 1fr) !important;
        /* 1 column on mobile */
        gap: 20px !important;
    }
}

/* Sidebar Styling */
.sidebar .categories-carousal {
    padding: 20px !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
}

.sidebar .categories-carousal .views-view-responsive-grid--horizontal,
.sidebar .categories-carousal .swiper {
    grid-template-columns: 1fr !important;
    /* Stack items in sidebar */
    gap: 15px !important;
}

.sidebar h2 {
    font-size: 18px !important;
    margin-bottom: 20px !important;
    text-align: left !important;
}

.sidebar h2::after {
    margin: 10px 0 0 !important;
}

/* Sidebar Menu Styling - Dark Theme Redesign */
.sidebar .block-menu {
    background: #0f172a !important;
    /* Dark Navy */
    padding: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.sidebar .block-menu h2 {
    background: #0f172a !important;
    color: #ffffff !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    font-size: 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-align: left !important;
}

.sidebar .block-menu .nav {
    flex-direction: column !important;
    display: flex !important;
    padding: 10px 0 !important;
}

.sidebar .block-menu .nav-item {
    width: 100% !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sidebar .block-menu .nav-item:last-child {
    border-bottom: none !important;
}

.sidebar .block-menu .nav-link {
    padding: 12px 20px !important;
    color: #ffffff !important;
    /* White text */
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    display: block !important;
    text-align: left !important;
}

.sidebar .block-menu .nav-link:hover,
.sidebar .block-menu .nav-link.is-active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding-left: 25px !important;
    /* Slight slide effect */
    font-weight: 600 !important;
}

/* Categories Responsive */
@media (max-width: 1024px) {

    .categories-carousal .views-view-responsive-grid--horizontal,
    .categories-carousal .categories-swiper,
    .categories-carousal .swiper {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {

    .categories-carousal .views-view-responsive-grid--horizontal,
    .categories-carousal .categories-swiper,
    .categories-carousal .swiper {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .categories-carousal .views-field-field-image .field-content {
        height: 250px !important;
    }
}

@media (max-width: 576px) {

    .categories-carousal .views-view-responsive-grid--horizontal,
    .categories-carousal .categories-swiper,
    .categories-carousal .swiper {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   CATEGORY BLOCK PAGE - RESPONSIVE
======================================== */

/* Force single column on mobile for category pages */
@media (max-width: 576px) {

    /* Override inline styles with maximum specificity */
    .view-category-block .views-view-grid.horizontal.cols-4.clearfix .views-row .views-col[style*="width"] {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: block !important;
        margin-bottom: 1.5rem !important;
    }

    /* Force grid to display as block */
    .view-category-block .views-view-grid {
        display: block !important;
    }

    /* Force rows to display as block */
    .view-category-block .views-row {
        display: block !important;
        width: 100% !important;
        clear: both !important;
    }

    /* Product cards styling */
    .view-category-block .views-col {
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 12px !important;
        padding: 1rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }

    /* Images full width */
    .view-category-block .views-field-field-iamge img {
        width: 100% !important;
        height: auto !important;
        max-height: 350px !important;
    }

    /* Buttons full width */
    .view-category-block button[value="Add to cart"] {
        width: 100% !important;
    }

    /* Show sidebar above products on mobile */
    .sidebar_first {
        order: -1 !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 2rem !important;
    }

    /* Ensure main content comes after sidebar */
    .main-content {
        order: 1 !important;
    }
}