/*
 * Sokid.ee Hyvä desktop layout
 * Mobile remains unchanged.
 */

@media (min-width: 1024px) {

    /* ===== HEADER ===== */

    #header > .container {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    #header .logo img {
        width: auto;
        max-width: 170px;
        height: auto;
    }

    #header .navigation > div {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    #header .navigation nav > ul {
        column-gap: 1.5rem;
        row-gap: 0.25rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    #header .navigation .level-0 {
        font-size: 0.95rem;
        line-height: 1.3rem;
    }

    #header .navigation .level-0 > a {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    /* ===== BREADCRUMBS ===== */

    .breadcrumbs {
        font-size: 0.875rem;
    }

    .breadcrumbs .container {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    /* ===== CATEGORY INTRO ===== */

    .catalog-category-view .page-main {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .catalog-category-view .page-title {
        font-size: 2rem;
        line-height: 1.15;
        margin-bottom: 1.5rem;
    }

    /*
     * Desktop:
     * image floats left,
     * description uses the free space on the right.
     */
    .catalog-category-view .category-image {
        float: left;
        width: min(42%, 520px);
        margin: 0 2rem 1.5rem 0;
    }

    .catalog-category-view .category-image img {
        width: 100%;
        max-width: 520px;
        height: auto;
        display: block;
    }

    .catalog-category-view .category-description {
        max-width: none;
        font-size: 0.975rem;
        line-height: 1.55;
        padding-top: 0.1rem;
    }

    .catalog-category-view .category-description p {
        margin-top: 0;
        margin-bottom: 0.6rem;
    }

    /*
     * Product/filter area must start below the complete intro.
     */
    .catalog-category-view .columns {
        clear: both;
        padding-top: 0.5rem;
    }

    /* ===== PRODUCT AREA ===== */

    .catalog-category-view .products-grid {
        clear: both;
    }
}

/*
 * Wide desktop: slightly more breathing room,
 * but no giant image or oversized typography.
 */
@media (min-width: 1280px) {

    .catalog-category-view .category-image {
        width: 480px;
    }

    .catalog-category-view .category-description {
        font-size: 1rem;
        line-height: 1.55;
    }
}

/* ===== CATEGORY INTRO GRID FIX ===== */

@media (min-width: 1024px) {

    .catalog-category-view #category-view-container {
        display: grid;
        grid-template-columns: minmax(360px, 480px) minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
        margin-bottom: 2rem;
    }

    .catalog-category-view #category-view-container .category-image {
        float: none;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .catalog-category-view #category-view-container .category-image img {
        width: 100%;
        max-width: 480px;
        height: auto;
        display: block;
    }

    .catalog-category-view #category-view-container .category-description {
        max-width: 760px;
        width: 100%;
        padding-top: 0;
        font-size: 1rem;
        line-height: 1.55;
    }

    .catalog-category-view #category-view-container .category-description > :first-child {
        margin-top: 0;
    }

    .catalog-category-view #category-view-container .category-description h2 {
        margin-top: 0;
        margin-bottom: 0.75rem;
        font-size: 1.4rem;
        line-height: 1.25;
        font-weight: 600;
    }

    .catalog-category-view #category-view-container .category-description h3 {
        margin-top: 1rem;
        margin-bottom: 0.4rem;
        font-size: 1.05rem;
        line-height: 1.3;
        font-weight: 600;
    }

    .catalog-category-view #category-view-container .category-description ul {
        margin-top: 0.35rem;
        margin-bottom: 0.75rem;
        padding-left: 1.25rem;
    }

    .catalog-category-view #category-view-container .category-description li {
        margin-bottom: 0.2rem;
    }
}

@media (min-width: 1280px) {
    .catalog-category-view #category-view-container {
        grid-template-columns: 500px minmax(0, 1fr);
        gap: 3rem;
    }

    .catalog-category-view #category-view-container .category-image img {
        max-width: 500px;
    }
}

/* ===== KINKEKARBID SEO BELOW PRODUCTS ===== */

.category-kinkekarbid .category-seo-below {
    margin-top: 2.5rem;
    margin-bottom: 3rem;
}

.category-kinkekarbid .category-seo-below-content {
    max-width: 900px;
    font-size: 1rem;
    line-height: 1.6;
}

.category-kinkekarbid .category-seo-below-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    line-height: 1.3;
    font-weight: 600;
}

.category-kinkekarbid .category-seo-below-content p {
    margin-bottom: 0.75rem;
}

.category-kinkekarbid .category-seo-below-content ul {
    list-style: disc;
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {

    .category-kinkekarbid #category-view-container {
        margin-bottom: 1.5rem;
    }

    .category-kinkekarbid #category-view-container .category-description {
        align-self: start;
    }
}

/* ===== SOKID GLOBAL FREE SHIPPING BAR ===== */

.sokid-global-delivery-note {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 9px 16px;
    text-align: center;
    background: #f5f7f9;
    border-top: 1px solid #e3e7ea;
    border-bottom: 1px solid #e3e7ea;
    color: #1d4ed8;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

@media (max-width: 767px) {
    .sokid-global-delivery-note {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ===== MOBILE CATEGORY CARDS ===== */
@media (max-width: 767px) {
    .catalog-category-view .page-title {
        font-size: 27px !important;
        line-height: 1.15 !important;
        margin-bottom: 16px !important;
    }

    .catalog-category-view .columns {
        row-gap: 12px !important;
    }

    .catalog-category-view #product-list {
        padding-top: 0 !important;
    }

    .catalog-category-view .sidebar-main .block {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 10px 12px !important;
    }

    .catalog-category-view .sidebar-main .block-title button {
        min-height: 38px;
    }

    .catalog-category-view .sidebar-main .block-title span.text-md {
        font-size: 15px;
        line-height: 1.2;
    }

    .catalog-category-view .toolbar-products {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        gap: 8px !important;
    }

    .catalog-category-view .toolbar-products .modes {
        display: none !important;
    }

    .catalog-category-view .toolbar-products .toolbar-sorter {
        grid-column: 1 / -1 !important;
        justify-content: flex-start !important;
    }

    .catalog-category-view .toolbar-products .toolbar-sorter select {
        min-height: 38px;
        height: 38px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .catalog-category-view .sokid-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        padding-top: 0.5rem !important;
    }

    .catalog-category-view .sokid-product-grid-item,
    .catalog-category-view .sokid-category-card {
        min-width: 0;
    }

    .catalog-category-view .sokid-category-card {
        padding: 8px !important;
        height: 100%;
        overflow: hidden;
    }

    .catalog-category-view .sokid-category-card-photo {
        width: 100%;
        margin-bottom: 6px !important;
    }

    .catalog-category-view .sokid-category-card-photo .product-image-container,
    .catalog-category-view .sokid-category-card-photo img {
        width: 100% !important;
    }

    .catalog-category-view .sokid-category-card-photo .product-image-wrapper {
        padding-bottom: 115% !important;
    }

    .catalog-category-view .sokid-category-card-info {
        min-height: 0;
    }

    .catalog-category-view .sokid-category-card-name {
        margin: 4px 0 6px !important;
        font-size: 15px !important;
        line-height: 1.25 !important;
        min-height: 56px;
        text-align: left !important;
    }

    .catalog-category-view .sokid-category-card-name .product-item-link {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .catalog-category-view .sokid-category-card .product-reviews-summary,
    .catalog-category-view .sokid-category-card .rating-summary,
    .catalog-category-view .sokid-category-card [class*="rating"],
    .catalog-category-view .sokid-category-card [data-addto="wishlist"],
    .catalog-category-view .sokid-category-card [data-addto="compare"] {
        display: none !important;
    }

    .catalog-category-view .sokid-category-card-price {
        margin-top: auto;
        padding-top: 0 !important;
        min-height: 44px;
        display: flex;
        align-items: flex-end;
    }

    .catalog-category-view .sokid-category-card-price .price-box {
        margin: 0 !important;
        line-height: 1.15;
    }

    .catalog-category-view .sokid-category-card-price .price {
        font-size: 17px !important;
        font-weight: 700;
    }

    .catalog-category-view .sokid-category-card-actions {
        padding-top: 6px !important;
        gap: 0 !important;
        justify-content: stretch !important;
    }

    .catalog-category-view .sokid-category-cart {
        width: 100%;
        min-height: 36px !important;
        padding: 5px 8px !important;
        font-size: 13px !important;
        line-height: 1.15 !important;
        border-radius: 9px !important;
    }

    .catalog-category-view .sokid-category-cart svg {
        width: 18px;
        height: 18px;
    }
}

/* ===== MOBILE PRODUCT PAGE ===== */
@media (max-width: 767px) {
    .catalog-product-view .page-title {
        font-size: 27px !important;
        line-height: 1.15 !important;
        margin-bottom: 1rem !important;
    }

    .catalog-product-view .breadcrumbs {
        box-shadow: none;
    }

    .catalog-product-view .breadcrumbs .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .catalog-product-view .breadcrumbs ol {
        padding-top: 0.45rem !important;
        padding-bottom: 0.45rem !important;
        font-size: 12px !important;
    }

    .catalog-product-view .breadcrumbs .separator {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }

    .catalog-product-view #gallery {
        margin-bottom: 0 !important;
    }

    .catalog-product-view #gallery-main {
        max-height: 72vw;
    }

    .catalog-product-view #gallery .snap-pager {
        gap: 6px;
        padding-top: 6px;
        padding-bottom: 2px;
    }

    .catalog-product-view #gallery .snap-marker {
        width: 9px;
        height: 9px;
        border-radius: 999px;
    }

    .catalog-product-view #gallery + .card,
    .catalog-product-view #gallery ~ .card {
        margin-top: 0 !important;
    }
}

/* Hide product review form */
.catalog-product-view #review-form {
    display: none !important;
}

/* Sokid.ee checkout + minicart accent color */
.opc-progress-bar-item._active:before,
.opc-progress-bar-item._complete:before,
.opc-progress-bar-item._active > span:before,
.opc-progress-bar-item._complete > span:before,
.opc-progress-bar-item._active:after,
.opc-progress-bar-item._complete:after {
    background: #1E88E5 !important;
    border-color: #1E88E5 !important;
}

.opc-progress-bar-item._active > span,
.opc-progress-bar-item._complete > span {
    color: #1E88E5 !important;
}

.minicart-wrapper .action.showcart .counter.qty,
.counter.qty {
    background: #1E88E5 !important;
    color: #fff !important;
}

/* Peida aadressiväli checkout'is */
.checkout-index-index #shipping-new-address-form fieldset.field.street {
    display: none !important;
}
