/* =========================================
   PRODUCT CARD REDESIGN – ALL SCREENS
   Etalons: "Jums varētu patikt" related-product-card
   ========================================= */

/* Noņemt aprakstu no kartītes */
.products_item_text { display: none; }

/* === Grid wrappers — CSS Grid kā etalons === */
#startpage_top_products,
.product-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-left: 0;
    margin-right: 0;
}
/* Hide clearfix pseudo-elements in grid */
#startpage_top_products::before,
#startpage_top_products::after,
.product-list::before,
.product-list::after {
    display: none;
}
/* Override Bootstrap columns — let grid control layout */
#startpage_top_products > [class*="col-"],
.product-list > [class*="col-"] {
    width: 100% !important;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    display: flex;
    float: none;
}
/* Pagination full width */
.product-list > .col-xs-12 {
    grid-column: 1 / -1;
}
/* Empty container full width */
.product-list > div[data-ng-if="filtered.length == 0"] {
    grid-column: 1 / -1;
}

/* === Kartīte — flush image, shadow kā related-product-card === */
.products_item {
    background: #fff;
    box-shadow: 0 0 3px rgba(105,110,79,0.3);
    border: none;
    border-radius: 6px;
    max-width: none;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.products_item:hover {
    box-shadow: 0 0 12px rgba(105,110,79,0.35);
}

/* === Attēls — flush, aspect-ratio 1:1, kartīte apgriež stūrus === */
.products_item_image {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0;
    margin: 0;
    max-width: none;
}
.products_item_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* === Saturs — padding 8px, kompakts === */
.products_item_content,
.products_item_content.min {
    height: auto;
    overflow: visible;
    padding: 8px 8px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Nosaukums — match related-product-card__title */
.products_item_title {
    display: block;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin-bottom: 4px;
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.products_item_title:hover,
.products_item_title:focus {
    color: #09614D;
    text-decoration: none;
}

/* Zvaigznītes */
.products_item_rating {
    margin-top: 2px;
    margin-bottom: 4px;
}

/* Cena — match related-product-card__price */
.products_item_price {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
}
.products_item_price.footer {
    display: none;
}

/* === Footer — spinneris, Standard/Premium, poga === */
.products_item_footer {
    position: static;
    width: auto;
    padding: 0 8px 8px;
    margin-top: auto;
}
.products_item_footer::before,
.products_item_footer::after {
    display: none;
}

/* "Atvērt preci" poga — outline stils, pilna platuma */
.products_item_footer .btn,
.products_item_footer .button {
    background: transparent;
    color: #09614D;
    border: 2px solid #09614D;
    border-radius: 8px;
    font-weight: 600;
    text-shadow: none;
    transition: all 200ms ease;
    width: 100%;
    display: block;
    box-sizing: border-box;
}
.products_item_footer .btn:hover,
.products_item_footer .button:hover {
    background: rgba(9, 97, 77, 0.05);
    color: #09614D;
    border: 2px solid #09614D;
    transform: none;
    box-shadow: none;
}

/* Standarta / Premium pogas */
.products_item_footer .product-type {
    margin-bottom: 6px;
}
.products_item_footer .product-type_btn {
    border-radius: 4px;
    width: auto;
    min-width: 0;
    padding: 0 8px;
    font-size: 12px;
    height: 24px;
}

/* Spinneris — label + input vienā rindā */
.products_item_counter {
    width: 100%;
    float: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.products_item_counter_title {
    font-size: 11px;
    color: #888;
    display: block;
    white-space: nowrap;
}

/* Poga pilnā platumā */
.products_item_btn {
    width: 100%;
    float: none;
    padding-left: 0;
}

/* =========================================
   DESKTOP SEARCH BUTTON COLOR
   ========================================= */

.header-search-button {
    background: #09614D;
    background-image: none;
    filter: none;
}
.header-search-button:hover {
    background: #074d3d;
}
.header-search-button:focus,
.header-search-button:active {
    background: #064435;
}


/* =========================================
   MOBILE – 2 COL GRID
   ========================================= */

@media (max-width: 767px) {

    #startpage_top_products,
    .product-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding-left: 4px;
        padding-right: 4px;
    }

    /* Title clamp */
    .products_item_title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.6em;
    }

    /* Hide spinner and premium buttons on mobile catalog cards only */
    .products_item .products_item_counter,
    .products_item .spinner,
    .products_item .product-type {
        display: none !important;
    }

    /* Full width button when spinner hidden */
    .products_item_btn {
        width: 100%;
        float: none;
    }

    /* Pagination full width */
    .product-list > .col-xs-12 {
        grid-column: 1 / -1;
    }

    /* Reduce gap between reviews and about-text on mobile */
    .reviews-slider {
        margin-bottom: 20px;
    }
    .about-text {
        margin-top: 25px;
    }

}

/* =========================================
   HEADER DAY - ICON 32px
   ========================================= */

.header-day {
    padding-left: 42px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='32px' viewBox='0 -960 960 960' width='32px' fill='%2309614d'%3E%3Cpath d='M160-80v-440H80v-240h208q-5-9-6.5-19t-1.5-21q0-50 35-85t85-35q23 0 43 8.5t37 23.5q17-16 37-24t43-8q50 0 85 35t35 85q0 11-2 20.5t-6 19.5h208v240h-80v440H160Zm400-760q-17 0-28.5 11.5T520-800q0 17 11.5 28.5T560-760q17 0 28.5-11.5T600-800q0-17-11.5-28.5T560-840Zm-200 40q0 17 11.5 28.5T400-760q17 0 28.5-11.5T440-800q0-17-11.5-28.5T400-840q-17 0-28.5 11.5T360-800ZM160-680v80h280v-80H160Zm280 520v-360H240v360h200Zm80 0h200v-360H520v360Zm280-440v-80H520v80h280Z'/%3E%3C/svg%3E") 0 5px no-repeat;
    background-size: 32px 32px;
}


/* Desktop sidebar - bultiņa kategorijām ar apakškategorijām */
.categories_item:has(.categories_sub) > .categories_link.js-cat-item::after {
    content: "";
    width: 8px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12' fill='%2309614D'%3E%3Cpath d='M0 0 L8 6 L0 12 Z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    transition: transform 0.3s;
}

.categories_item:has(.categories_sub) > .categories_link.js-cat-item.active::after {
    transform: rotate(90deg);
}

/* Logo size now controlled globally in style.css:
   .header-container .logo img { max-width: 200px; height: auto; } */




/* =========================================
   NAV DROPDOWN — Desktop only
   ========================================= */

@media (min-width: 992px) {

.nav-container {
    position: relative;
    z-index: 200;
}

/* Dropdown wrapper — positioned relative for dropdown placement */
.nav-dropdown-wrap {
    display: inline-block;
    position: relative;
}

/* Caret icon */
.nav-dropdown__caret {
    vertical-align: middle;
    margin-left: 2px;
    margin-bottom: 1px;
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-dropdown-wrap.dd-open .nav-dropdown__caret {
    transform: rotate(180deg);
    opacity: 1;
}

/* Dropdown panel */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-4px);
}
.nav-dropdown-wrap.dd-open .nav-dropdown {
    display: block;
    animation: navDropdownFadeIn 150ms ease forwards;
}
@keyframes navDropdownFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Dropdown list */
.nav-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Dropdown link */
.nav-dropdown__link {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    text-decoration: none;
    padding: 8px 20px;
    white-space: nowrap;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown__link:hover {
    background: #f5f5f5;
    color: #09614D;
    text-decoration: none;
}

}/* end @media min-width: 992px */

/* Hide dropdown on mobile/tablet */
@media (max-width: 991px) {
    .nav-dropdown {
        display: none !important;
    }
    .nav-dropdown__caret {
        display: none;
    }
    .nav-dropdown-wrap {
        display: inline;
    }
}

/* =========================================
   HOMEPAGE LAYOUT — Desktop only
   ========================================= */

@media (min-width: 992px) {

/* Hide sidebar on homepage */
.page-home > .row > .sidebar.visible-lg {
    display: none !important;
}

/* Main content full width on homepage */
.page-home > .row > .col-lg-9 {
    width: 100%;
}

/* Product grid 4 columns on homepage desktop */
.page-home #startpage_top_products {
    grid-template-columns: repeat(4, 1fr);
}

}/* end homepage desktop */
