/*
 * Casa Marcus - Alineacion de tarjetas de productos
 * Codazon list-style35
 * No modifica inventario ni funcionamiento del carrito.
 */

/* Tarjetas con altura uniforme */
.products-grid:is(.product-list-style-35, .grid-style-35) .product-items > .product-item {
    display: flex;
    align-self: stretch;
}

.products-grid:is(.product-list-style-35, .grid-style-35) .product-item-info {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* Contenido flexible */
.products-grid:is(.product-list-style-35, .grid-style-35) .product-item-details {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

/* Reservar espacio para nombres de hasta 3 lineas */
.products-grid:is(.product-list-style-35, .grid-style-35) .product-item-name {
    display: block;
    min-height: 3.9em;
}

/* Mantener acciones al fondo */
.products-grid:is(.product-list-style-35, .grid-style-35) .product-item-details .button-wrap {
    margin-top: auto;
}

/* Reservar el mismo espacio para acciones y cantidad */
.products-grid:is(.product-list-style-35, .grid-style-35) .button-wrap .cart-qty {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 90px;
}

/* Conservar el formulario a todo el ancho */
.products-grid:is(.product-list-style-35, .grid-style-35) .button-wrap .cart-qty > form {
    width: 100%;
}

/* Alinear abajo el boton de productos agotados */
.products-grid:is(.product-list-style-35, .grid-style-35) .button-wrap .cart-qty > .action.tocart {
    margin-top: auto;
}

/* CM-FIX-OUT-OF-STOCK-ALIGNMENT */
/* Alinear al fondo las acciones de productos disponibles y agotados */
.products-grid:is(.product-list-style-35, .grid-style-35) .product-item-details .button-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 90px;
}

/* CM-CARDS-REDESIGN-20261113
   Casa Marcus - Categorias escritorio y movil
   Basado en las versiones visuales V9 y V11
*/

/* Tarjeta */
.products-grid.product-list-style-35 .product-item-info {
    position: relative !important;
    box-sizing: border-box !important;
    padding: 26px 12px 12px !important;
    background: #fff !important;
    border: 1px solid #e9e9ef !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(20,25,70,.06) !important;
    transition: box-shadow .2s ease, transform .2s ease;
}

@media (hover: hover) {
    .products-grid.product-list-style-35 .product-item-info:hover {
        box-shadow: 0 8px 22px rgba(20,25,70,.12) !important;
        transform: translateY(-2px);
    }
}

/* Marca */
.products-grid.product-list-style-35 .cm-product-brand {
    position: absolute;
    top: 10px;
    right: 13px;
    z-index: 2;
    max-width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #777;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* Imagen */
.products-grid.product-list-style-35 .product-item-top {
    position: relative !important;
}

.products-grid.product-list-style-35 .product-item-photo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 6px !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border: 1px solid #ededf2 !important;
    border-radius: 12px !important;
}

.products-grid.product-list-style-35 .product-image-container {
    width: 100% !important;
    max-width: 100% !important;
}

.products-grid.product-list-style-35 .product-image-wrapper {
    position: relative !important;
    height: 150px !important;
    padding-bottom: 0 !important;
}

.products-grid.product-list-style-35 .product-image-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Informacion */
.products-grid.product-list-style-35 .product-item-details {
    text-align: left !important;
}

.products-grid.product-list-style-35 .product-item-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 0 6px !important;
    line-height: 19px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: left !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

.products-grid.product-list-style-35 .product-item-sku {
    margin-bottom: 0 !important;
    color: #777 !important;
    font-size: 11px !important;
    text-align: left !important;
}

/* Reservar espacio para calificaciones */
.products-grid.product-list-style-35 .product-reviews-summary {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 24px !important;
    margin: 0 !important;
}

.products-grid.product-list-style-35 .product-item-sku + .price-box {
    margin-top: 32px !important;
}

.products-grid.product-list-style-35 .product-reviews-summary + .price-box {
    margin-top: 8px !important;
}

/* Precio */
.products-grid.product-list-style-35 .price-box {
    margin-bottom: 8px !important;
    text-align: left !important;
}

.products-grid.product-list-style-35 .price-box .price {
    color: #e89a00 !important;
    font-size: 21px !important;
    font-weight: 700 !important;
}

/* Cantidad */
.products-grid.product-list-style-35 .button-wrap .cart-qty {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.products-grid.product-list-style-35 .cart-qty .field.qty {
    width: 100% !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.products-grid.product-list-style-35 .cart-qty .field.qty .control {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 42px !important;
    padding: 4px !important;
    background: #f5f6f9 !important;
    border-radius: 7px !important;
}

.products-grid.product-list-style-35 .cart-qty .qty-ctl {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 34px !important;
    flex: 0 0 36px !important;
}

.products-grid.product-list-style-35 .cart-qty .qty-ctl button {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;
    color: #252666 !important;
    font-size: 16px !important;
}

.products-grid.product-list-style-35 .cart-qty input.qty {
    flex: 1 1 auto !important;
    width: 40px !important;
    min-width: 0 !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #252666 !important;
    font-size: 14px !important;
}

/* Botones */
.products-grid.product-list-style-35 .button-wrap {
    margin-top: auto !important;
}

.products-grid.product-list-style-35 .cart-qty .action.tocart {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 100% !important;
    min-height: 42px !important;
    margin-top: 9px !important;
    border: 1px solid #252666 !important;
    border-radius: 7px !important;
    background: #252666 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.products-grid.product-list-style-35 .cart-qty form .action.tocart:hover {
    background: #35378c !important;
    border-color: #35378c !important;
}

.products-grid.product-list-style-35 .cart-qty .action.tocart:disabled,
.products-grid.product-list-style-35 .cart-qty .action.tocart.disabled {
    background: #9696b0 !important;
    border-color: #9696b0 !important;
}

/* Escritorio */
@media (min-width: 769px) {
    .products-grid.product-list-style-35 .product-items {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)) !important;
        gap: 18px !important;
        align-items: stretch !important;
    }

    .products-grid.product-list-style-35 .product-item {
        float: none !important;
        clear: none !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Movil */
@media (max-width: 768px) {
    .products-grid.product-list-style-35 .product-items {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px 10px !important;
    }

    .products-grid.product-list-style-35 .product-item {
        float: none !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .products-grid.product-list-style-35 .product-item-info {
        padding: 26px 9px 10px !important;
    }

    .products-grid.product-list-style-35 .product-image-wrapper {
        height: 125px !important;
    }

    .products-grid.product-list-style-35 .product-item-name {
        display: block !important;
        height: auto !important;
        min-height: 60px !important;
        overflow: visible !important;
        font-size: 12.5px !important;
        line-height: 17px !important;
    }

    .products-grid.product-list-style-35 .price-box .price {
        font-size: 18px !important;
    }

    .products-grid.product-list-style-35 .cart-qty .action.tocart {
        gap: 4px !important;
        padding: 7px 3px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    /* Favoritos dentro de la fotografia */
    .products-grid.product-list-style-35
    .product-item-top > .button-hover-wrap {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        transform: none !important;
        z-index: 12 !important;
    }

    .products-grid.product-list-style-35
    .button-hover-wrap .action.towishlist {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        margin: 0 !important;
        background: rgba(255,255,255,.96) !important;
        border: 1px solid #e9e9ef !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 6px rgba(0,0,0,.07) !important;
        color: #252666 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

/* CM-FIX-CART-BUTTON-CENTER */
/* Centrar botones de compra y agotados sin alterar la cantidad. */

.products-grid.product-list-style-35 .button-wrap .cart-qty > form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.products-grid.product-list-style-35 .button-wrap .cart-qty .action.tocart {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* CM-FIX-FEW-PRODUCTS */
/* Evitar que las tarjetas se estiren en categorias con pocos productos */
@media (min-width: 769px) {
    body.catalog-category-view
    .products-grid.product-list-style-35 .product-items {
        grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)) !important;
    }
}

/* CM-HOME-CARDS-20261113 */
/* Casa Marcus - Diseno de tarjetas del Home */
/* Conservar distribucion y carruseles de Codazon */

body.cms-index-index .products-grid.grid-style-35 .product-item-info {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    padding: 27px 12px 12px !important;
    background: #fff !important;
    border: 1px solid #e9e9ef !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(20,25,70,.06) !important;
}

@media (hover: hover) {
    body.cms-index-index .products-grid.grid-style-35 .product-item-info:hover {
        box-shadow: 0 8px 22px rgba(20,25,70,.12) !important;
        transform: translateY(-2px);
    }
}

/* Marca real */
body.cms-index-index .products-grid.grid-style-35 .cm-product-brand {
    position: absolute;
    top: 9px;
    right: 12px;
    z-index: 2;
    max-width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #777;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    pointer-events: none;
}

/* Fotografia */
body.cms-index-index .products-grid.grid-style-35 .product-item-top {
    position: relative !important;
}

body.cms-index-index .products-grid.grid-style-35 .product-item-photo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 6px !important;
    margin-bottom: 8px !important;
    background: #fff !important;
    border: 1px solid #ededf2 !important;
    border-radius: 12px !important;
}

body.cms-index-index .products-grid.grid-style-35 .product-image-container {
    width: 100% !important;
    max-width: 100% !important;
}

body.cms-index-index .products-grid.grid-style-35 .product-image-wrapper {
    position: relative !important;
    height: 150px !important;
    padding-bottom: 0 !important;
}

body.cms-index-index .products-grid.grid-style-35 .product-image-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Contenido */
body.cms-index-index .products-grid.grid-style-35 .product-item-details,
body.cms-index-index .products-grid.grid-style-35 .product-item-inner {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: left !important;
}

body.cms-index-index .products-grid.grid-style-35 .product-item-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 0 6px !important;
    font-size: 14px !important;
    line-height: 19px !important;
    font-weight: 500 !important;
    text-align: left !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

body.cms-index-index .products-grid.grid-style-35 .product-item-sku {
    margin-bottom: 0 !important;
    color: #777 !important;
    font-size: 11px !important;
    text-align: left !important;
}

/* Calificaciones y precios alineados */
body.cms-index-index .products-grid.grid-style-35 .product-reviews-summary {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 24px !important;
    margin: 0 !important;
}

body.cms-index-index .products-grid.grid-style-35
.product-item-sku + .price-box {
    margin-top: 32px !important;
}

body.cms-index-index .products-grid.grid-style-35
.product-reviews-summary + .price-box {
    margin-top: 8px !important;
}

body.cms-index-index .products-grid.grid-style-35 .price-box {
    margin-bottom: 8px !important;
    text-align: left !important;
}

body.cms-index-index .products-grid.grid-style-35 .price-box .price {
    color: #e89a00 !important;
    font-size: 21px !important;
    font-weight: 700 !important;
}

/* Acciones y cantidad */
body.cms-index-index .products-grid.grid-style-35 .button-wrap {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    margin-top: auto !important;
}

body.cms-index-index .products-grid.grid-style-35 .cart-qty {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    height: auto !important;
}

body.cms-index-index .products-grid.grid-style-35 .cart-qty > form {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.cms-index-index .products-grid.grid-style-35 .field.qty {
    width: 100% !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.cms-index-index .products-grid.grid-style-35 .field.qty .control {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 42px !important;
    padding: 4px !important;
    background: #f5f6f9 !important;
    border-radius: 7px !important;
}

body.cms-index-index .products-grid.grid-style-35 .qty-ctl {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 34px !important;
    flex: 0 0 36px !important;
}

body.cms-index-index .products-grid.grid-style-35 .qty-ctl button {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;
    color: #252666 !important;
    font-size: 16px !important;
}

body.cms-index-index .products-grid.grid-style-35 input.qty {
    flex: 1 1 auto !important;
    width: 35px !important;
    min-width: 0 !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #252666 !important;
}

/* Boton de compra */
body.cms-index-index .products-grid.grid-style-35 .cart-qty .action.tocart {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 42px !important;
    margin: 9px 0 0 !important;
    background: #252666 !important;
    border: 1px solid #252666 !important;
    border-radius: 7px !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

body.cms-index-index .products-grid.grid-style-35 .action.tocart:disabled,
body.cms-index-index .products-grid.grid-style-35 .action.tocart.disabled {
    background: #9696b0 !important;
    border-color: #9696b0 !important;
}

body.cms-index-index .products-grid.grid-style-35 .cm-cart-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    pointer-events: none;
}

/* Movil */
@media (max-width: 768px) {
    body.cms-index-index .products-grid.grid-style-35 .product-item-info {
        padding: 26px 9px 10px !important;
    }

    body.cms-index-index .products-grid.grid-style-35 .product-image-wrapper {
        height: 125px !important;
    }

    body.cms-index-index .products-grid.grid-style-35 .product-item-name {
        display: block !important;
        height: auto !important;
        min-height: 60px !important;
        overflow: visible !important;
        font-size: 12.5px !important;
        line-height: 17px !important;
    }

    body.cms-index-index .products-grid.grid-style-35 .price-box .price {
        font-size: 18px !important;
    }

    body.cms-index-index .products-grid.grid-style-35 .cart-qty .action.tocart {
        gap: 4px !important;
        padding: 7px 3px !important;
        font-size: 11px !important;
    }

    /* Favoritos dentro de la fotografia */
    body.cms-index-index .products-grid.grid-style-35
    .product-item-top > .button-hover-wrap {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        transform: none !important;
        z-index: 12 !important;
    }

    body.cms-index-index .products-grid.grid-style-35
    .button-hover-wrap .action.towishlist {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        margin: 0 !important;
        background: rgba(255,255,255,.96) !important;
        border: 1px solid #e9e9ef !important;
        border-radius: 50% !important;
        color: #252666 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}


/* CM-CATALOG-IMAGE-V5-DESKTOP
   Casa Marcus - Fotografias grandes sin marco interior
   Solo escritorio - 2026-11-21
*/
@media (min-width: 1024px) {

    .products-grid.product-list-style-35 .product-item-top {
        height: auto !important;
    }

    .products-grid.product-list-style-35 .product-item-photo {
        display: block !important;
        width: 100% !important;
        height: 220px !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .products-grid.product-list-style-35 .product-image-container {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .products-grid.product-list-style-35 .product-image-wrapper {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .products-grid.product-list-style-35 .product-image-photo {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        transform: none !important;
        margin: auto !important;
    }
}

/* CM-HOME-IMAGE-V6-DESKTOP
   Casa Marcus - Fotografias grandes sin recuadro interior
   Home escritorio - 2026-11-21
   Independiente de V5 categorias
*/
@media (min-width: 1024px) {

    body.cms-index-index
    .cdz-product-wrap.product-list-style-35
    .products-grid.grid-style-35
    .product-item-top {
        height: auto !important;
    }

    body.cms-index-index
    .cdz-product-wrap.product-list-style-35
    .products-grid.grid-style-35
    .product-item-photo {
        display: block !important;
        width: 100% !important;
        height: 220px !important;
        padding: 0 !important;
        margin-bottom: 8px !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    body.cms-index-index
    .cdz-product-wrap.product-list-style-35
    .products-grid.grid-style-35
    .product-image-container {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
    }

    body.cms-index-index
    .cdz-product-wrap.product-list-style-35
    .products-grid.grid-style-35
    .product-image-wrapper {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    body.cms-index-index
    .cdz-product-wrap.product-list-style-35
    .products-grid.grid-style-35
    img.product-image-photo {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        transform: none !important;
        margin: auto !important;
    }
}
