/**
 * Oshen Theme — Button Normalization
 * Fixes inconsistent button colors/sizes across the Hummingbird theme.
 * Brand: #7A9E7E (green), Hover: #000 (black)
 */

/* ============================================
   1. PRIMARY BUTTONS (e.g., "Apmokėti", "Pirkti")
   Brand green bg, white text
   Hover: black bg, white text
   ============================================ */
.btn-primary,
.btn.btn-primary,
a.btn-primary,
button.btn-primary {
    background-color: #7A9E7E !important;
    border-color: #7A9E7E !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

/* ============================================
   2. OUTLINE BUTTONS (e.g., "Peržiūrėti krepšelį", "Tęsti pirkimą")
   White bg, black border + black text
   Hover: black bg, white text
   Same proportional sizing as primary
   ============================================ */
.btn-outline-primary,
.btn.btn-outline-primary,
a.btn-outline-primary,
button.btn-outline-primary,
.btn-outline-secondary,
.btn.btn-outline-secondary {
    background-color: transparent !important;
    border-color: #000 !important;
    color: #000 !important;
}

.btn-outline-primary:hover,
.btn.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn.btn-outline-secondary:hover,
.btn-outline-primary:focus,
.btn-outline-secondary:focus {
    background-color: #000 !important;
    color: #fff !important;
}

/* ============================================
   3. CONSISTENT BUTTON SIZING
   All .btn elements get same padding/font-size
   ============================================ */
.btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    border-radius: var(--bs-border-radius, 4px);
    transition: all 0.2s ease;
    line-height: 1.5;
}

/* ============================================
   4. CART POPUP MODAL BUTTONS
   ============================================ */
.blockcart-modal .modal-footer .btn {
    min-width: 160px;
    text-align: center;
    justify-content: center;
}

.blockcart-modal .modal-footer .btn-primary {
    background-color: #7A9E7E !important;
    border-color: #7A9E7E !important;
    color: #fff !important;
}

.blockcart-modal .modal-footer .btn-primary:hover {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

.blockcart-modal .modal-footer .btn-outline-primary {
    background-color: transparent !important;
    border-color: #000 !important;
    color: #000 !important;
}

.blockcart-modal .modal-footer .btn-outline-primary:hover {
    background-color: #000 !important;
    color: #fff !important;
}

/* ============================================
   5. SMALL BUTTON VARIANTS (keep size if needed)
   ============================================ */
.btn-sm {
    padding: 0.375rem 1rem !important;
    font-size: 0.8125rem !important;
}

.btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
}

/* ============================================
   6. FULL-WIDTH BUTTONS
   ============================================ */
.w-100.btn,
.btn.w-100,
.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   7. BUTTONS IN CARDS / PRODUCT LIST
   ============================================ */
.product-miniature .btn-primary,
.product-actions .btn-primary {
    background-color: #7A9E7E !important;
    border-color: #7A9E7E !important;
    color: #fff !important;
}

.product-miniature .btn-primary:hover,
.product-actions .btn-primary:hover {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

/* ============================================
   8. CHECKOUT BUTTONS
   ============================================ */
.cart-grid__footer .btn-primary,
.checkout .btn-primary,
#checkout .btn-primary,
.js-cart .btn-primary {
    background-color: #7A9E7E !important;
    border-color: #7A9E7E !important;
    color: #fff !important;
}

.cart-grid__footer .btn-primary:hover,
.checkout .btn-primary:hover,
#checkout .btn-primary:hover {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

/* ============================================
   9. FORM SUBMIT BUTTONS
   ============================================ */
.form-control-submit,
button[type="submit"].btn-primary,
input[type="submit"].btn-primary {
    background-color: #7A9E7E !important;
    border-color: #7A9E7E !important;
    color: #fff !important;
}

.form-control-submit:hover,
button[type="submit"].btn-primary:hover {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

/* ============================================
   10. DISABLED STATE
   ============================================ */
.btn:disabled,
.btn.disabled,
.btn-primary:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   11. PRODUCT MINIATURE — ADD-TO-CART OVERLAY
   Add-to-cart button positioned bottom-right over image.
   Button +10% bigger, eye/quickview icon smaller.
   ============================================ */

/* Make the top area a positioning context */
.product-miniature__top {
    position: relative;
    overflow: hidden;
}

/* Add-to-cart button overlay — bottom-right corner of image, ALWAYS visible */
.product-miniature__actions-overlay,
.product-miniature:hover .product-miniature__actions-overlay,
.product-miniature__top:hover .product-miniature__actions-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 3;
    transform: none !important;
    transition: none !important;
}

/* Add-to-cart button: +10% bigger (icon-only, square), perfectly centered */
.product-miniature__add {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    position: relative !important;
}

.product-miniature__add .material-icons {
    font-size: 1.35rem !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
}

/* Remove text label — icon only */
.product-miniature__add-text {
    display: none;
}

/* Quickview (eye) button — top-right corner, icon-only on desktop */
.product-miniature__quickview-button,
.product-miniature:hover .product-miniature__quickview-button,
.product-miniature__top:hover .product-miniature__quickview-button {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 5 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255,255,255,0.95) !important;
    color: #333 !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 5px !important;
    box-shadow: none;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden !important;
    transform: none !important;
    transition: none !important;
}

.product-miniature__quickview-button .material-icons {
    font-size: 1.25rem !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide the text node inside quickview button */
.product-miniature__quickview-button {
    text-indent: -9999px;
    white-space: nowrap;
    direction: ltr;
}
.product-miniature__quickview-button .material-icons {
    text-indent: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

/* Quickview touch button — hidden on desktop, shown on mobile */
.product-miniature__quickview-touch {
    display: none !important;
}

@media (max-width: 768px) {
    .product-miniature__quickview-button {
        display: none !important;
    }

    .product-miniature__quickview-touch,
    .product-miniature:hover .product-miniature__quickview-touch {
        display: flex !important;
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        z-index: 5 !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        padding: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255,255,255,0.95) !important;
        color: #333 !important;
        border: 1px solid rgba(0,0,0,0.08) !important;
        border-radius: 4px !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.12);
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .product-miniature__quickview-touch .material-icons {
        font-size: 1.2rem !important;
        line-height: 1 !important;
    }

    /* Add-to-cart button slightly smaller on mobile */
    .product-miniature__add {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }
}

/* ============================================
   QUICKVIEW — no box-shadow
   ============================================ */
.quickview .modal-content,
#quickview-modal .modal-content {
    box-shadow: none !important;
}

/* ============================================
   VMENU CATEGORY ICONS
   ============================================ */
.vmenu-offcanvas__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin-right: 0.5rem;
    border-radius: 3px;
    overflow: hidden;
}

.vmenu-offcanvas__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vmenu-offcanvas__parent-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.vmenu-offcanvas__parent-link > span:not(.vmenu-offcanvas__icon) {
    flex: 1;
    text-align: left;
}

.vmenu-offcanvas__parent-arrow {
    flex-shrink: 0;
    margin-left: auto;
}

/* ============================================
   SEARCH DROPDOWN — products only, no categories
   ============================================ */
.search-dropdown__inner {
    grid-template-columns: 1fr !important;
}

.search-dropdown__categories {
    display: none !important;
}

/* ============================================
   HOME BANNERS — match side padding on top
   ============================================ */
.home-banners {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Product title spacing — more gap from image */
.product-miniature__title {
    display: block;
    margin-top: 0.75rem;
    padding-top: 0.25rem;
}

.product-miniature__infos {
    padding-top: 0.25rem;
}

/* Product flags badges — brand green, NOT blue */
.product-flags .badge,
.product-miniature .badge,
.product-flags li.badge {
    background-color: #7A9E7E !important;
    color: #fff !important;
    border: none !important;
}

/* ============================================
   11b. PRODUCT MINIATURE — DISABLE HOVER EFFECTS
   No image lift, no transform on hover
   ============================================ */
.product-miniature:hover .product-miniature__top,
.product-miniature__top:hover,
.product-miniature__image:hover,
.product-miniature:hover img,
.product-miniature:hover .product-miniature__image-wrapper {
    transform: none !important;
    transition: none !important;
}

.product-miniature__inner:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   12. VOUCHER INLINE (MINI CART / OFF CANVAS)
   ============================================ */
.cart-voucher__inline {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

.cart-voucher__inline .cart-voucher__form {
    margin-bottom: 0.5rem;
}

.cart-voucher__inline .input-group {
    display: flex;
    flex-wrap: nowrap;
}

.cart-voucher__inline .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.cart-voucher__inline .btn-primary {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.cart-voucher__error,
.cart-voucher__success {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-voucher__error .material-icons,
.cart-voucher__success .material-icons {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============================================
   13. QUANTITY INPUT GROUP — compact buttons
   Override global .btn padding for +/- spinners
   ============================================ */
.quantity-button__group,
.product-line__quantity-button .input-group,
.product__quantity .input-group {
    flex-wrap: nowrap !important;
}

.quantity-button__group .btn,
.product-line__quantity-button .btn,
.product__quantity .btn,
.quantity-button .btn,
.js-quantity-button .btn,
.qty-input .btn {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.75rem !important;
    min-width: auto !important;
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
}

.quantity-button__group .form-control,
.product-line__quantity-button .form-control,
.product__quantity .form-control,
.quantity-button .form-control,
.js-quantity-button .form-control {
    min-width: 40px !important;
    max-width: 50px !important;
    padding: 0.25rem 0.25rem !important;
    text-align: center;
    flex: 0 0 auto !important;
}

/* ============================================
   14. CART PAGE — DISCOUNT BADGE & REMOVE LINK
   Force brand green instead of Bootstrap blue
   ============================================ */

/* Discount badges (-20%, -5 € etc.) */
.product-line__item-discount.badge {
    --bs-primary-rgb: 122, 158, 126 !important;
    background-color: #7A9E7E !important;
    color: #fff !important;
}

.badge.bg-primary,
.product-line__item-discount.bg-primary,
.cart-summary .badge.bg-primary {
    background-color: #7A9E7E !important;
    color: #fff !important;
}

/* "Remove" link in cart */
.product-line__actions .js-remove-from-cart,
.product-line__actions a[data-link-action="delete-from-cart"],
.cart-voucher__remove {
    color: #7A9E7E !important;
    text-decoration: none;
}

.product-line__actions .js-remove-from-cart:hover,
.product-line__actions a[data-link-action="delete-from-cart"]:hover,
.cart-voucher__remove:hover {
    color: #000 !important;
    text-decoration: underline;
}

/* ============================================
   15. POPUPS & OFFCANVAS — clean white minimal headers
   Remove bg color + border-bottom, wider desktop, full-width mobile
   ============================================ */

/* Vmenu offcanvas */
.vmenu-offcanvas .offcanvas-header,
#offcanvas-vmenu .offcanvas-header {
    background: #fff !important;
    border-bottom: none !important;
    padding: 1rem 1.25rem !important;
}

/* User profile offcanvas */
.user-offcanvas .offcanvas-header,
#offcanvas-user .offcanvas-header {
    background: #fff !important;
    border-bottom: none !important;
    padding: 1rem 1.25rem !important;
}

/* Cart offcanvas */
#offcanvas-cart .offcanvas-header,
.cart-offcanvas .offcanvas-header {
    background: #fff !important;
    border-bottom: none !important;
    padding: 1rem 1.25rem !important;
}

/* Offcanvas close button — cleaner */
.offcanvas-header .btn-close {
    opacity: 0.4;
}
.offcanvas-header .btn-close:hover {
    opacity: 0.7;
}

/* Desktop: wider popups */
@media (min-width: 769px) {
    .vmenu-offcanvas,
    #offcanvas-vmenu {
        --bs-offcanvas-width: 380px;
    }
    .user-offcanvas,
    #offcanvas-user {
        --bs-offcanvas-width: 380px;
    }
    #offcanvas-cart,
    .cart-offcanvas {
        --bs-offcanvas-width: 420px;
    }
}

/* Mobile: full width */
@media (max-width: 768px) {
    .vmenu-offcanvas,
    #offcanvas-vmenu,
    .user-offcanvas,
    #offcanvas-user,
    #offcanvas-cart,
    .cart-offcanvas {
        --bs-offcanvas-width: 100vw;
    }
}

/* User offcanvas — brand-colored login button */
.user-offcanvas__link--primary {
    background-color: #7A9E7E !important;
    color: #fff !important;
    font-weight: 500 !important;
}
.user-offcanvas__link--primary:hover {
    background-color: #000 !important;
    color: #fff !important;
}

/* ============================================
   ORDER TRACKING / GUEST — narrow centered
   ============================================ */
body#guest-tracking .page-content,
body#guest-tracking #content-wrapper {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

body#guest-tracking #content-wrapper form {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* ============================================
   15. PRODUCT GRID — 5 columns → 2 → 1
   Responsive product archive grid
   ============================================ */
.products {
    display: grid;
    gap: 1rem;
}

/* Skeleton grid */
.skeleton-products {
    display: grid;
    gap: 1rem;
}

/* 5 columns on XXL (≥1400px) */
@media (min-width: 1400px) {
    .products,
    .skeleton-products {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 4 columns on XL (≥1200px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .products,
    .skeleton-products {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 3 columns on LG (≥992px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .products,
    .skeleton-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2 columns on MD (≥768px) */
@media (min-width: 768px) and (max-width: 991px) {
    .products,
    .skeleton-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 2 columns on SM (≥576px) */
@media (min-width: 576px) and (max-width: 767px) {
    .products,
    .skeleton-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 column on XS (<576px) */
@media (max-width: 575px) {
    .products,
    .skeleton-products {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   14. CART PAGE — DISCOUNT BADGE & REMOVE LINK
   Force brand green instead of Bootstrap blue
   ============================================ */

/* Discount badges (-20%, -5 € etc.) */
.product-line__item-discount.badge {
    --bs-primary-rgb: 122, 158, 126 !important;
    background-color: #7A9E7E !important;
    color: #fff !important;
}

.badge.bg-primary,
.product-line__item-discount.bg-primary,
.cart-summary .badge.bg-primary {
    background-color: #7A9E7E !important;
    color: #fff !important;
}

/* "Remove" link in cart */
.product-line__actions .js-remove-from-cart,
.product-line__actions a[data-link-action="delete-from-cart"],
.cart-voucher__remove {
    color: #7A9E7E !important;
    text-decoration: none;
}

.product-line__actions .js-remove-from-cart:hover,
.product-line__actions a[data-link-action="delete-from-cart"]:hover,
.cart-voucher__remove:hover {
    color: #000 !important;
    text-decoration: underline;
}
