/*
Theme Name: Oferta Directa Conversion
Theme URI: https://ofertadirecta.com.uy/
Description: Child theme de Storefront optimizado para conversion, mobile-first y WooCommerce.
Author: OpenAI / Oferta Directa
Template: storefront
Version: 1.0.22
Text Domain: oferta-directa
*/


/* v0.19 — Compact cart top spacing */
body.woocommerce-cart .entry-header,
body.woocommerce-cart header.entry-header {
    display: none !important;
}

body.woocommerce-cart .site-main,
body.woocommerce-cart .content-area,
body.woocommerce-cart .hentry,
body.woocommerce-cart .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.woocommerce-cart .woocommerce {
    margin-top: 0 !important;
}

body.woocommerce-cart .woocommerce-breadcrumb {
    margin-bottom: 22px !important;
}

body.woocommerce-cart .od-cart-layout,
body.woocommerce-cart form.woocommerce-cart-form,
body.woocommerce-cart .cart-collaterals {
    margin-top: 0 !important;
}

@media (min-width: 768px) {
    body.woocommerce-cart .site-content {
        padding-top: 0 !important;
    }

    body.woocommerce-cart .col-full {
        padding-top: 0 !important;
    }

    body.woocommerce-cart .woocommerce-breadcrumb {
        margin-top: 0 !important;
    }
}

@media (max-width: 767px) {
    body.woocommerce-cart .woocommerce-breadcrumb {
        margin-bottom: 14px !important;
    }
}


/* v0.20 — Remove remaining Storefront cart whitespace */
body.woocommerce-cart #primary,
body.woocommerce-cart #main,
body.woocommerce-cart main.site-main,
body.woocommerce-cart article.hentry,
body.woocommerce-cart .entry-content,
body.woocommerce-cart .woocommerce {
    min-height: 0 !important;
    height: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.woocommerce-cart .site-content > .col-full {
    padding-top: 0 !important;
    padding-bottom: 32px !important;
}

body.woocommerce-cart .woocommerce-breadcrumb {
    margin: 18px 0 24px !important;
}

body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .cart-collaterals,
body.woocommerce-cart .od-cart-layout {
    transform: none !important;
    top: auto !important;
    margin-top: 0 !important;
}

body.woocommerce-cart .entry-content > .woocommerce {
    padding-top: 0 !important;
}

@media (min-width: 768px) {
    body.woocommerce-cart #primary.content-area {
        margin-bottom: 0 !important;
    }

    body.woocommerce-cart .woocommerce {
        display: block !important;
    }

    body.woocommerce-cart .woocommerce-breadcrumb + * {
        margin-top: 0 !important;
    }
}

@media (max-width: 767px) {
    body.woocommerce-cart .woocommerce-breadcrumb {
        margin: 12px 0 16px !important;
    }
}


/* v0.21 — Pull cart content up below breadcrumb */
@media (min-width: 768px) {
    body.woocommerce-cart .entry-content > .woocommerce {
        margin-top: -118px !important;
    }
}
@media (max-width: 767px) {
    body.woocommerce-cart .entry-content > .woocommerce {
        margin-top: -54px !important;
    }
}


/* v0.22 — Empty cart redesign */
body.woocommerce-cart .od-empty-cart {
    max-width: 560px;
    margin: 18px auto 56px;
    padding: 42px 34px;
    text-align: center;
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 18px;
    box-shadow: 0 10px 32px rgba(20, 24, 40, .05);
}

body.woocommerce-cart .od-empty-cart__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f4f5f8;
}

body.woocommerce-cart .od-empty-cart__icon svg {
    width: 26px;
    height: 26px;
    stroke: #111226;
}

body.woocommerce-cart .od-empty-cart h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    color: #111226;
}

body.woocommerce-cart .od-empty-cart p {
    margin: 0 auto 22px;
    max-width: 420px;
    color: #687086;
    font-size: 15px;
    line-height: 1.55;
}

body.woocommerce-cart .od-empty-cart .button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px !important;
    border-radius: 10px !important;
    background: #111226 !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

body.woocommerce-cart .od-empty-cart .button:hover {
    opacity: .92;
}

body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .cart-empty.woocommerce-info,
body.woocommerce-cart .return-to-shop {
    display: none !important;
}

@media (max-width: 767px) {
    body.woocommerce-cart .od-empty-cart {
        margin: 8px 14px 32px;
        padding: 32px 22px;
        border-radius: 14px;
    }

    body.woocommerce-cart .od-empty-cart h2 {
        font-size: 23px;
    }

    body.woocommerce-cart .od-empty-cart .button {
        width: 100%;
    }
}


/* v0.23 — Move empty cart closer to breadcrumb */
body.woocommerce-cart .od-empty-cart {
    margin-top: -90px !important;
}

@media (max-width: 767px) {
    body.woocommerce-cart .od-empty-cart {
        margin-top: -28px !important;
    }
}


/* v0.24 — Shop/archive redesign */
body.post-type-archive-product .site-main,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main {
    padding-top: 0 !important;
}

body.post-type-archive-product .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb,
body.tax-product_tag .woocommerce-breadcrumb {
    margin: 18px 0 20px !important;
}

body.post-type-archive-product .woocommerce-products-header,
body.tax-product_cat .woocommerce-products-header,
body.tax-product_tag .woocommerce-products-header {
    margin: 0 0 18px !important;
    padding: 0 !important;
    text-align: left !important;
}

body.post-type-archive-product .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title,
body.tax-product_tag .woocommerce-products-header__title {
    margin: 0 !important;
    font-size: clamp(28px, 3vw, 40px) !important;
    line-height: 1.15 !important;
    font-weight: 500 !important;
    color: #111226 !important;
}

body.post-type-archive-product .term-description,
body.tax-product_cat .term-description,
body.tax-product_tag .term-description {
    margin-top: 8px !important;
    max-width: 720px;
    color: #687086;
}

.od-shop-cats {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 0 18px;
    margin: 0 0 8px;
}
.od-shop-cats::-webkit-scrollbar { display: none; }

.od-shop-cats a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid #dfe3ec;
    border-radius: 999px;
    background: #fff;
    color: #111226;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: .18s ease;
}
.od-shop-cats a:hover,
.od-shop-cats a.is-active {
    background: #111226;
    color: #fff;
    border-color: #111226;
}

body.post-type-archive-product .storefront-sorting,
body.tax-product_cat .storefront-sorting,
body.tax-product_tag .storefront-sorting {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 18px !important;
    padding: 0 !important;
}

body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count {
    float: none !important;
    margin: 0 !important;
    color: #687086;
    font-size: 13px;
}

body.post-type-archive-product .woocommerce-ordering,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_tag .woocommerce-ordering {
    float: none !important;
    margin: 0 !important;
}

body.post-type-archive-product .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select {
    min-width: 190px;
    height: 42px;
    padding: 0 38px 0 14px;
    border: 1px solid #dfe3ec;
    border-radius: 10px;
    background-color: #fff;
    color: #111226;
    font-size: 13px;
}

body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products {
    margin-top: 0 !important;
}

body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
    margin-bottom: 22px !important;
}

@media (min-width: 768px) {
    body.post-type-archive-product .site-content .col-full,
    body.tax-product_cat .site-content .col-full,
    body.tax-product_tag .site-content .col-full {
        padding-top: 0 !important;
    }
}

@media (max-width: 767px) {
    body.post-type-archive-product .woocommerce-breadcrumb,
    body.tax-product_cat .woocommerce-breadcrumb,
    body.tax-product_tag .woocommerce-breadcrumb {
        margin: 12px 0 14px !important;
    }

    body.post-type-archive-product .woocommerce-products-header,
    body.tax-product_cat .woocommerce-products-header,
    body.tax-product_tag .woocommerce-products-header {
        margin-bottom: 14px !important;
    }

    body.post-type-archive-product .storefront-sorting,
    body.tax-product_cat .storefront-sorting,
    body.tax-product_tag .storefront-sorting {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    body.post-type-archive-product .woocommerce-ordering,
    body.tax-product_cat .woocommerce-ordering,
    body.tax-product_tag .woocommerce-ordering,
    body.post-type-archive-product .woocommerce-ordering select,
    body.tax-product_cat .woocommerce-ordering select,
    body.tax-product_tag .woocommerce-ordering select {
        width: 100%;
    }

    .od-shop-cats {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* v0.26 — Footer: keep four columns aligned on desktop */
@media (min-width: 900px) {
    .od-footer-grid,
    .site-footer .od-footer-grid,
    .od-footer__grid {
        display: grid !important;
        grid-template-columns: minmax(320px, 1.55fr) minmax(150px, .75fr) minmax(180px, .85fr) minmax(220px, 1fr) !important;
        gap: 48px !important;
        align-items: start !important;
    }

    .od-footer-grid > *,
    .site-footer .od-footer-grid > *,
    .od-footer__grid > * {
        grid-column: auto !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .od-footer-grid,
    .site-footer .od-footer-grid,
    .od-footer__grid {
        display: grid !important;
        grid-template-columns: 1.4fr 1fr !important;
        gap: 34px 46px !important;
    }
}
