/* =========================================================================
   Rimanto įrankiai — Shop UX redesign
   Scoped to body.rt-shop so it never affects Elementor-built pages.
   Brand: dark #111315, orange #f07922.
   ========================================================================= */

:root {
    --rt-orange: #f07922;
    --rt-orange-dark: #d76812;
    --rt-ink: #14171a;
    --rt-muted: #6b7280;
    --rt-line: #e8eaed;
    --rt-radius: 14px;
    --rt-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
    --rt-shadow-hover: 0 12px 32px rgba(16,24,40,.14);
}

body.rt-shop { background: #f6f7f9; }

/* Page width / spacing */
body.rt-shop .site-content,
body.rt-shop .ast-container { max-width: 1320px; }

/* --- Hide the "Shop" page title / archive banner --- */
body.rt-shop-archive .woocommerce-products-header,
body.rt-shop-archive .woocommerce-products-header__title,
body.rt-shop-archive .ast-archive-description .ast-archive-title,
body.rt-shop-archive .entry-header.ast-archive-description > .ast-archive-title,
body.rt-shop-archive .page-title { display: none !important; }

/* --- Hide breadcrumb (Home / Parduotuvė) on shop/archive --- */
body.rt-shop-archive .woocommerce-breadcrumb,
body.rt-shop-archive nav.woocommerce-breadcrumb,
body.rt-shop-archive .ast-breadcrumbs,
body.rt-shop-archive .rank-math-breadcrumb,
body.rt-shop-archive .breadcrumbs,
body.rt-shop-archive .breadcrumb,
body.rt-shop-archive nav[aria-label="Breadcrumb"],
body.rt-shop-archive nav[aria-label="breadcrumb"] { display: none !important; }

/* =========================================================================
   Two-column layout: filter sidebar + product main
   ========================================================================= */
body.rt-shop .rt-shop-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    max-width: 1240px;
    margin: 8px auto 0;
}
body.rt-shop .rt-shop-main { flex: 1 1 auto; min-width: 0; }

body.rt-shop .rt-filters {
    flex: 0 0 270px;
    width: 270px;
    background: #fff;
    border: 1px solid var(--rt-line);
    border-radius: var(--rt-radius);
    padding: 22px 20px;
    box-shadow: var(--rt-shadow);
    font-family: 'Montserrat', sans-serif;
}
body.rt-shop .rt-filters-head { display: none; }
body.rt-shop .rt-filters-head h2 { font-size: 18px; font-weight: 800; margin: 0; }

body.rt-shop .rt-clear {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 13px; font-weight: 600;
    color: var(--rt-orange); text-decoration: none;
}
body.rt-shop .rt-clear:hover { text-decoration: underline; }

body.rt-shop .rt-fgroup { padding: 16px 0; border-top: 1px solid var(--rt-line); }
body.rt-shop .rt-fgroup:first-of-type { border-top: 0; padding-top: 0; }
body.rt-shop .rt-fgroup h3 {
    font-size: 14px; font-weight: 700; color: var(--rt-ink);
    margin: 0 0 12px; text-transform: uppercase; letter-spacing: .03em;
}

/* Filter lists */
body.rt-shop .rt-flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
body.rt-shop .rt-flist a {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 8px;
    font-size: 14px; color: #374151; text-decoration: none;
    transition: background .12s ease, color .12s ease;
}
body.rt-shop .rt-flist a:hover { background: #f3f4f6; color: var(--rt-ink); }
body.rt-shop .rt-flist a.is-active { background: #fff3e9; color: var(--rt-orange-dark); font-weight: 700; }
body.rt-shop .rt-flist a .rt-fl-label { flex: 1 1 auto; min-width: 0; }
body.rt-shop .rt-count {
    flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--rt-muted);
    background: #f1f2f4; border-radius: 999px; padding: 2px 9px; min-width: 24px; text-align: center;
}
body.rt-shop .rt-flist a.is-active .rt-count { background: #fde2cc; color: var(--rt-orange-dark); }

/* Long category list → contained scroll */
body.rt-shop .rt-flist--cats { max-height: 340px; overflow-y: auto; padding-right: 4px; }
body.rt-shop .rt-flist--cats::-webkit-scrollbar { width: 6px; }
body.rt-shop .rt-flist--cats::-webkit-scrollbar-track { background: transparent; }
body.rt-shop .rt-flist--cats::-webkit-scrollbar-thumb { background: #d7dbe0; border-radius: 999px; }


/* =========================================================================
   Condition (Būklė) — clean checkbox rows
   ========================================================================= */
body.rt-shop .rt-checklist { gap: 6px; }
body.rt-shop .rt-checklist a.rt-check {
    border: 1px solid var(--rt-line);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}
body.rt-shop .rt-checklist a.rt-check:hover { border-color: #cdd1d6; background: #fafbfc; }
body.rt-shop .rt-checklist a.rt-check.is-active {
    border-color: var(--rt-orange);
    background: #fff7f0;
}
body.rt-shop .rt-checklist .rt-box {
    flex: 0 0 20px; width: 20px; height: 20px;
    border-radius: 6px; border: 2px solid #cdd1d6; background: #fff;
    position: relative; transition: all .12s ease;
}
body.rt-shop .rt-checklist a.rt-check.is-active .rt-box {
    background: var(--rt-orange); border-color: var(--rt-orange);
}
body.rt-shop .rt-checklist a.rt-check.is-active .rt-box::after {
    content: ""; position: absolute; left: 5px; top: 1px;
    width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
body.rt-shop .rt-checklist .rt-fl-label { font-weight: 600; color: var(--rt-ink); }

/* Mini search */
body.rt-shop .rt-search-mini { display: flex; border: 1px solid var(--rt-line); border-radius: 10px; overflow: hidden; }
body.rt-shop .rt-search-mini input { flex: 1 1 auto; border: 0; padding: 10px 12px; font-size: 14px; min-width: 0; background: #fff; }
body.rt-shop .rt-search-mini input:focus { outline: none; }
body.rt-shop .rt-search-mini button { flex: 0 0 auto; border: 0; background: #f3f4f6; color: #374151; padding: 0 14px; cursor: pointer; }
body.rt-shop .rt-search-mini button:hover { background: var(--rt-orange); color: #fff; }

/* Price form */
body.rt-shop .rt-price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
body.rt-shop .rt-price-row input {
    width: 100%; min-width: 0; border: 1px solid var(--rt-line); border-radius: 8px;
    padding: 9px 10px; font-size: 14px; -moz-appearance: textfield;
}
body.rt-shop .rt-price-row input:focus { outline: none; border-color: var(--rt-orange); }
body.rt-shop .rt-price-row .rt-eur { color: var(--rt-muted); font-weight: 600; }
body.rt-shop .rt-price-form button {
    width: 100%; border: 0; background: var(--rt-ink); color: #fff; border-radius: 9px;
    padding: 11px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit;
    transition: background .15s ease;
}
body.rt-shop .rt-price-form button:hover { background: #000; }

/* Mobile filter toggle (hidden on desktop) */
body.rt-shop .rt-filters-toggle {
    display: none;
    align-items: center; gap: 8px;
    background: var(--rt-ink); color: #fff; border: 0; border-radius: 10px;
    padding: 12px 18px; font-weight: 700; font-size: 14px; cursor: pointer;
    font-family: 'Montserrat', sans-serif; margin-bottom: 18px;
}
body.rt-shop .rt-filters-backdrop { display: none; }

/* =========================================================================
   Toolbar: result count + ordering
   ========================================================================= */
body.rt-shop .woocommerce-result-count,
body.rt-shop .woocommerce-ordering {
    margin-bottom: 22px;
}
body.rt-shop .woocommerce-result-count {
    color: var(--rt-muted);
    font-size: 14px;
    padding-top: 10px;
}
body.rt-shop .woocommerce-ordering select,
body.rt-shop .orderby {
    -webkit-appearance: none; appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    border: 1px solid var(--rt-line);
    border-radius: 10px;
    padding: 11px 40px 11px 16px;
    font-size: 14px; color: var(--rt-ink); cursor: pointer;
    box-shadow: var(--rt-shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.rt-shop .woocommerce-ordering select:hover { border-color: #cdd1d6; }
body.rt-shop .woocommerce-ordering select:focus { outline: none; border-color: var(--rt-orange); }

/* Live-search loading state */
body.rt-shop .rt-grid-wrap { transition: opacity .15s ease; }
body.rt-shop .rt-grid-wrap.rt-loading { opacity: .45; pointer-events: none; }
body.rt-shop .rt-noresults {
    grid-column: 1 / -1;
    background: #fff; border: 1px solid var(--rt-line); border-radius: var(--rt-radius);
    padding: 28px; text-align: center; color: var(--rt-muted); font-weight: 600;
}

/* =========================================================================
   Product grid
   ========================================================================= */
body.rt-shop ul.products,
body.rt-shop .woocommerce ul.products,
body.rt-shop .woocommerce ul.products:not(.elementor-grid) {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
    margin: 0 0 30px !important;
    padding: 0;
    list-style: none;
}
/* neutralise theme float/width rules */
body.rt-shop ul.products li.product,
body.rt-shop .woocommerce ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    padding: 0 !important;
}

/* =========================================================================
   Product card
   ========================================================================= */
body.rt-shop ul.products li.product {
    position: relative;
    background: #fff;
    border: 1px solid var(--rt-line);
    border-radius: var(--rt-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--rt-shadow);
    transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s ease, border-color .25s ease;
}
body.rt-shop ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: var(--rt-shadow-hover);
    border-color: #dfe2e6;
}

/* Image: normalise the varied source thumbnails into a clean square */
body.rt-shop li.product a.woocommerce-LoopProduct-link,
body.rt-shop li.product a.woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
body.rt-shop li.product .astra-shop-thumbnail-wrap,
body.rt-shop li.product a img,
body.rt-shop li.product img {
    margin: 0 !important;
    border-radius: 0 !important;
}
body.rt-shop li.product a img,
body.rt-shop li.product img.attachment-woocommerce_thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    padding: 14px;
    transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
body.rt-shop li.product:hover a img { transform: scale(1.05); }

/* Title */
body.rt-shop li.product .woocommerce-loop-product__title,
body.rt-shop li.product h2,
body.rt-shop li.product h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px !important;
    font-weight: 600;
    line-height: 1.35;
    color: var(--rt-ink);
    padding: 4px 16px 0 !important;
    margin: 0 !important;
    /* clamp to 2 lines for an even grid */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

/* Category chip (Astra prints .ast-woo-product-category above the title) */
body.rt-shop li.product .ast-woo-product-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin: 14px 16px 0 !important;
    padding: 5px 11px 5px 9px !important;
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--rt-orange-dark);
    background: #fff3e9;
    border-radius: 999px;
}
body.rt-shop li.product .ast-woo-product-category::before {
    content: "";
    width: 12px; height: 12px; flex: 0 0 12px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 7a2 2 0 0 1 2-2h6l9 9-7 7-9-9V7Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle cx='7' cy='10' r='1.5' fill='black'/%3E%3C/svg%3E") no-repeat center / contain;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 7a2 2 0 0 1 2-2h6l9 9-7 7-9-9V7Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle cx='7' cy='10' r='1.5' fill='black'/%3E%3C/svg%3E") no-repeat center / contain;
}
body.rt-shop li.product .ast-woo-product-category a { color: inherit; text-decoration: none; }

/* Price */
body.rt-shop li.product .price {
    font-family: 'Montserrat', sans-serif;
    color: var(--rt-ink) !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    padding: 8px 16px 0 !important;
    margin: 0 !important;
    margin-top: auto !important;
}
body.rt-shop li.product .price del { color: var(--rt-muted); font-weight: 500; opacity: .7; }
body.rt-shop li.product .price ins { text-decoration: none; }

/* Add to cart button */
body.rt-shop li.product .button,
body.rt-shop li.product .added_to_cart {
    display: block;
    text-align: center;
    margin: 14px 16px 18px !important;
    padding: 12px 16px !important;
    background: var(--rt-orange) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 10px !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700 !important;
    font-size: 14px !important;
    letter-spacing: .01em;
    box-shadow: 0 4px 12px rgba(240,121,34,.28);
    transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
body.rt-shop li.product .button:hover {
    background: var(--rt-orange-dark) !important;
    box-shadow: 0 6px 16px rgba(240,121,34,.36);
}
body.rt-shop li.product .button:active { transform: translateY(1px); }
body.rt-shop li.product .added_to_cart {
    background: #1f2937 !important;
    box-shadow: none;
    margin-top: 0 !important;
}
/* AJAX "loading" + "added" states */
body.rt-shop li.product .button.loading { opacity: .75; }
body.rt-shop li.product .button.added::after { display: none; }

/* =========================================================================
   Badges (condition + sale)
   ========================================================================= */
body.rt-shop li.product .rt-badge {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 3;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    line-height: 1;
    backdrop-filter: blur(2px);
}
body.rt-shop li.product .rt-badge.is-new   { background: #16a34a; }
body.rt-shop li.product .rt-badge.is-used  { background: #2563eb; }
body.rt-shop li.product .rt-badge.is-other { background: #4b5563; }

body.rt-shop li.product .onsale {
    position: absolute;
    top: 12px; right: 12px; left: auto;
    margin: 0; min-height: 0; min-width: 0;
    border-radius: 999px;
    background: var(--rt-orange);
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 5px 10px; line-height: 1;
    z-index: 3;
}

/* =========================================================================
   Pagination
   ========================================================================= */
body.rt-shop .woocommerce-pagination ul { border: 0 !important; gap: 8px; display: flex; justify-content: center; }
body.rt-shop .woocommerce-pagination ul li { border: 0 !important; margin: 0; }
body.rt-shop .woocommerce-pagination ul li a,
body.rt-shop .woocommerce-pagination ul li span {
    border: 1px solid var(--rt-line) !important;
    background: #fff;
    border-radius: 10px !important;
    min-width: 42px; height: 42px;
    line-height: 42px !important;
    padding: 0 12px !important;
    font-weight: 600;
    color: var(--rt-ink);
    transition: all .15s ease;
}
body.rt-shop .woocommerce-pagination ul li a:hover {
    border-color: var(--rt-orange) !important;
    color: var(--rt-orange);
}
body.rt-shop .woocommerce-pagination ul li span.current {
    background: var(--rt-orange) !important;
    border-color: var(--rt-orange) !important;
    color: #fff !important;
}

/* =========================================================================
   Responsive — desktop 3 cols · tablet 2 cols · mobile 1 col
   ========================================================================= */

/* Tablet / small laptop: 2 columns (sidebar becomes a drawer here too) */
@media (max-width: 991px) {
    body.rt-shop ul.products,
    body.rt-shop .woocommerce ul.products,
    body.rt-shop .woocommerce ul.products:not(.elementor-grid) { grid-template-columns: repeat(2, 1fr) !important; gap: 18px; }
    body.rt-shop .woocommerce-ordering { float: none; }
}

/* Mobile: single column */
@media (max-width: 600px) {
    body.rt-shop ul.products,
    body.rt-shop .woocommerce ul.products,
    body.rt-shop .woocommerce ul.products:not(.elementor-grid) { grid-template-columns: 1fr !important; gap: 16px; }
    body.rt-shop li.product .woocommerce-loop-product__title,
    body.rt-shop li.product h2,
    body.rt-shop li.product h3 { font-size: 15px !important; min-height: 0; }
    body.rt-shop .woocommerce-ordering,
    body.rt-shop .woocommerce-ordering select { width: 100%; }
    body.rt-shop .woocommerce-result-count { width: 100%; }
}

/* =========================================================================
   Filter sidebar → off-canvas drawer on tablet/mobile
   ========================================================================= */
@media (max-width: 991px) {
    body.rt-shop .rt-shop-layout { display: block; }
    body.rt-shop .rt-filters-toggle {
        display: inline-flex;
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 95;
        margin: 0;
        border-radius: 0 12px 12px 0;
        padding: 14px 16px 14px 14px;
        box-shadow: 0 10px 26px rgba(0,0,0,.28);
    }
    /* hide the floating tab while the drawer itself is open */
    body.rt-shop.rt-filters-open .rt-filters-toggle { opacity: 0; pointer-events: none; }

    body.rt-shop .rt-filters {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: 320px; max-width: 86vw;
        z-index: 100000;
        border-radius: 0; border: 0;
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.2,.7,.3,1);
        overflow-y: auto;
        box-shadow: 0 0 50px rgba(0,0,0,.3);
    }
    body.rt-shop.rt-filters-open .rt-filters { transform: translateX(0); }

    body.rt-shop .rt-filters-head {
        display: flex; align-items: center; justify-content: space-between;
        margin-bottom: 10px;
    }
    body.rt-shop .rt-filters-close {
        background: none; border: 0; font-size: 30px; line-height: 1;
        color: var(--rt-muted); cursor: pointer; padding: 0 4px;
    }

    body.rt-shop .rt-filters-backdrop {
        display: block; position: fixed; inset: 0;
        background: rgba(0,0,0,.45); z-index: 99999;
        opacity: 0; visibility: hidden; transition: opacity .25s ease;
    }
    body.rt-shop.rt-filters-open .rt-filters-backdrop { opacity: 1; visibility: visible; }
    body.rt-shop.rt-filters-open { overflow: hidden; }
}

/* =========================================================================
   SINGLE PRODUCT PAGE
   ========================================================================= */
body.rt-product { background: #f6f7f9; }
body.rt-product .site-content,
body.rt-product .ast-container { max-width: 1280px; }

/* Two-column: gallery + summary; tabs & related span full width */
body.rt-product div.product {
    display: grid !important;
    grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
    gap: 24px 48px;
    align-items: start;
    max-width: 1240px;
    margin: 8px auto 0 !important;
}
body.rt-product div.product::before,
body.rt-product div.product::after { content: none !important; display: none !important; }
body.rt-product div.product > * { float: none !important; width: auto !important; }

/* Gallery */
body.rt-product .woocommerce-product-gallery {
    grid-column: 1; margin: 0 !important;
    background: #fff; border: 1px solid var(--rt-line);
    border-radius: 16px; padding: 18px; box-shadow: var(--rt-shadow);
    position: relative;
}
body.rt-product .woocommerce-product-gallery img { border-radius: 10px; }
body.rt-product .woocommerce-product-gallery__wrapper { margin: 0; }
body.rt-product .woocommerce-product-gallery__trigger {
    top: 28px; right: 28px;
    width: 42px; height: 42px; border-radius: 999px;
    background: #fff; box-shadow: var(--rt-shadow); z-index: 5;
}
/* Gallery thumbnails (when a product has multiple images) */
body.rt-product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex; gap: 10px; margin-top: 14px; padding: 0; list-style: none;
}
body.rt-product .woocommerce-product-gallery .flex-control-thumbs li { width: 72px !important; margin: 0; }
body.rt-product .woocommerce-product-gallery .flex-control-thumbs img { border: 1px solid var(--rt-line); border-radius: 8px; }

/* Summary */
body.rt-product .summary, body.rt-product .entry-summary { grid-column: 2; margin: 0 !important; }
body.rt-product .product_title {
    font-family: 'Montserrat', sans-serif; font-weight: 800;
    font-size: 30px; line-height: 1.2; color: var(--rt-ink); margin: 6px 0 14px;
}
body.rt-product .single-product-category a,
body.rt-product .ast-woo-product-category a { color: var(--rt-orange); font-weight: 700; text-decoration: none; }
body.rt-product .summary .price {
    font-family: 'Montserrat', sans-serif; font-weight: 800;
    font-size: 30px; color: var(--rt-ink) !important; margin: 0 0 18px;
}
body.rt-product .summary .price del { color: var(--rt-muted); font-weight: 500; }
body.rt-product .woocommerce-product-details__short-description {
    color: #4b5563; line-height: 1.7; margin-bottom: 24px;
}

/* Add to cart */
body.rt-product form.cart { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
body.rt-product form.cart .quantity .qty {
    width: 74px; height: 54px; border: 1px solid var(--rt-line);
    border-radius: 10px; text-align: center; font-weight: 700; font-size: 15px; background: #fff;
}
body.rt-product .single_add_to_cart_button {
    background: var(--rt-orange) !important; color: #fff !important; border: 0 !important;
    border-radius: 10px !important; font-family: 'Montserrat', sans-serif;
    font-weight: 700 !important; font-size: 15px !important; padding: 16px 32px !important;
    box-shadow: 0 6px 16px rgba(240,121,34,.3); transition: background .15s ease, transform .1s ease;
}
body.rt-product .single_add_to_cart_button:hover { background: var(--rt-orange-dark) !important; }
body.rt-product .single_add_to_cart_button:active { transform: translateY(1px); }

/* Meta (SKU / category) */
body.rt-product .product_meta {
    border-top: 1px solid var(--rt-line); padding-top: 18px;
    font-size: 14px; color: var(--rt-muted);
}
body.rt-product .product_meta > span { display: block; margin-bottom: 7px; }
body.rt-product .product_meta a { color: var(--rt-orange-dark); text-decoration: none; }

/* Tabs */
body.rt-product .woocommerce-tabs {
    grid-column: 1 / -1; margin-top: 24px;
    background: #fff; border: 1px solid var(--rt-line);
    border-radius: 16px; padding: 6px 28px 28px; box-shadow: var(--rt-shadow);
}
body.rt-product .woocommerce-tabs ul.tabs {
    list-style: none; margin: 0 0 20px; padding: 0;
    display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--rt-line);
}
body.rt-product .woocommerce-tabs ul.tabs::before { display: none; }
body.rt-product .woocommerce-tabs ul.tabs li { background: none !important; border: 0 !important; margin: 0; padding: 0; border-radius: 0; }
body.rt-product .woocommerce-tabs ul.tabs li::before,
body.rt-product .woocommerce-tabs ul.tabs li::after { display: none !important; }
body.rt-product .woocommerce-tabs ul.tabs li a {
    display: block; padding: 14px 8px; font-family: 'Montserrat', sans-serif;
    font-weight: 700; color: var(--rt-muted); border-bottom: 3px solid transparent;
}
body.rt-product .woocommerce-tabs ul.tabs li.active a { color: var(--rt-ink); border-bottom-color: var(--rt-orange); }
body.rt-product .woocommerce-tabs .panel { color: #4b5563; line-height: 1.7; margin: 0; }
body.rt-product .woocommerce-Tabs-panel > h2:first-child { display: none; }

/* Related / upsells */
body.rt-product .related.products,
body.rt-product .upsells.products { grid-column: 1 / -1; margin-top: 34px; }
body.rt-product .related.products > h2,
body.rt-product .upsells.products > h2 {
    font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 24px; margin: 0 0 20px;
}

/* Responsive */
@media (max-width: 991px) {
    body.rt-product div.product { grid-template-columns: 1fr; gap: 22px; }
    body.rt-product .summary, body.rt-product .entry-summary { grid-column: 1; }
    body.rt-product .woocommerce-product-gallery { grid-column: 1; }
    body.rt-product .product_title { font-size: 24px; }
    body.rt-product .summary .price { font-size: 26px; }
}
@media (max-width: 600px) {
    body.rt-product .woocommerce-tabs { padding: 6px 16px 22px; }
    body.rt-product form.cart .single_add_to_cart_button { flex: 1 1 auto; }
    body.rt-product .woocommerce-tabs ul.tabs { gap: 0; }
    body.rt-product .woocommerce-tabs ul.tabs li a { padding: 12px 10px; font-size: 14px; }
}

/* =========================================================================
   Cart & Checkout — hide the page title
   ========================================================================= */
body.woocommerce-cart .entry-title,
body.woocommerce-cart .page-title,
body.woocommerce-cart .ast-single-entry-banner,
body.woocommerce-cart .woocommerce-products-header,
body.woocommerce-checkout .entry-title,
body.woocommerce-checkout .page-title,
body.woocommerce-checkout .ast-single-entry-banner,
body.woocommerce-checkout .woocommerce-products-header { display: none !important; }

/* =========================================================================
   Mobile side padding so content isn't edge-to-edge
   ========================================================================= */
@media (max-width: 991px) {
    body.rt-product div.product,
    body.rt-product .woocommerce-breadcrumb,
    body.rt-product .woocommerce-notices-wrapper,
    body.rt-product .related.products,
    body.woocommerce-cart .woocommerce,
    body.woocommerce-checkout .woocommerce {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    /* the gallery card already has its own inset — keep it flush within the 16px gutter */
    body.rt-product .related.products { padding-left: 16px !important; padding-right: 16px !important; }
}

/* =========================================================================
   PRODUCT GALLERY REDESIGN — fixed height + left/right arrow nav
   ========================================================================= */
body.rt-product .woocommerce-product-gallery { --gh: 460px; }

/* Fixed-height stage so portrait/tall images don't blow up the layout */
body.rt-product .woocommerce-product-gallery .flex-viewport { height: var(--gh) !important; border-radius: 10px; overflow: hidden; }
body.rt-product .woocommerce-product-gallery__wrapper { position: relative; margin: 0; }
body.rt-product .woocommerce-product-gallery__image,
body.rt-product .woocommerce-product-gallery__image > a { height: var(--gh); display: block; }
body.rt-product .woocommerce-product-gallery__image img,
body.rt-product .woocommerce-product-gallery .flex-viewport img {
    width: 100% !important;
    height: var(--gh) !important;
    object-fit: contain !important;
    background: #fff;
    border-radius: 10px;
}

/* Zoom magnifier */
body.rt-product .woocommerce-product-gallery__trigger {
    top: 14px; right: 14px;
    width: 44px; height: 44px; border-radius: 999px;
    background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); z-index: 7;
}

/* ---- Prev / Next arrow buttons (overlaid left & right) ---- */
body.rt-product .flex-direction-nav { list-style: none; margin: 0; padding: 0; }
body.rt-product .flex-direction-nav li { list-style: none; margin: 0; padding: 0; }
body.rt-product .flex-direction-nav a {
    position: absolute;
    top: calc(var(--gh) / 2);
    transform: translateY(-50%);
    width: 48px; height: 48px; margin: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 0 !important; color: transparent !important;
    opacity: 1; visibility: visible;
    z-index: 8;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
body.rt-product .flex-direction-nav a::before {
    content: ""; display: block;
    width: 12px; height: 12px;
    border-right: 2.5px solid var(--rt-ink);
    border-bottom: 2.5px solid var(--rt-ink);
    transition: border-color .15s ease;
}
body.rt-product .flex-direction-nav a.flex-prev { left: 14px; }
body.rt-product .flex-direction-nav a.flex-prev::before { transform: rotate(135deg); margin-left: 4px; }
body.rt-product .flex-direction-nav a.flex-next { right: 14px; left: auto; }
body.rt-product .flex-direction-nav a.flex-next::before { transform: rotate(-45deg); margin-right: 4px; }
body.rt-product .flex-direction-nav a:hover { background: var(--rt-orange); transform: translateY(-50%) scale(1.06); }
body.rt-product .flex-direction-nav a:hover::before { border-color: #fff; }
/* FlexSlider sometimes hides the disabled arrow at the ends — keep them usable since it loops */
body.rt-product .flex-direction-nav a.flex-disabled { opacity: .45 !important; filter: none; }

/* ---- Thumbnails ---- */
body.rt-product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none;
}
body.rt-product .woocommerce-product-gallery .flex-control-thumbs li { width: 74px !important; margin: 0; cursor: pointer; }
body.rt-product .woocommerce-product-gallery .flex-control-thumbs img {
    width: 74px !important; height: 74px !important; object-fit: cover;
    border: 2px solid var(--rt-line); border-radius: 8px; opacity: .75;
    transition: opacity .15s ease, border-color .15s ease;
}
body.rt-product .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; }
body.rt-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
    opacity: 1; border-color: var(--rt-orange);
}

@media (max-width: 991px) {
    body.rt-product .woocommerce-product-gallery { --gh: 360px; }
}
@media (max-width: 600px) {
    body.rt-product .woocommerce-product-gallery { --gh: 300px; }
    body.rt-product .flex-direction-nav a { width: 42px; height: 42px; }
    body.rt-product .woocommerce-product-gallery .flex-control-thumbs li,
    body.rt-product .woocommerce-product-gallery .flex-control-thumbs img { width: 60px !important; height: 60px; }
}

/* =========================================================================
   Product page — responsive polish
   ========================================================================= */
/* Related / upsell products: 2 per row on phones (shop archive stays 1) */
@media (max-width: 600px) {
    body.rt-product .related ul.products,
    body.rt-product .upsells ul.products {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    body.rt-product .related.products > h2,
    body.rt-product .upsells.products > h2 { font-size: 20px; }
    /* tighter related cards */
    body.rt-product .related li.product .woocommerce-loop-product__title,
    body.rt-product .upsells li.product .woocommerce-loop-product__title { font-size: 13px !important; min-height: 2.6em; }
    body.rt-product .related li.product .price,
    body.rt-product .upsells li.product .price { font-size: 15px !important; }
    body.rt-product .related li.product .button,
    body.rt-product .upsells li.product .button { font-size: 13px !important; padding: 10px 8px !important; margin: 10px 10px 12px !important; }
}

/* Gallery thumbnails: neat single scrollable row on phones (instead of wrapping) */
@media (max-width: 600px) {
    body.rt-product .woocommerce-product-gallery .flex-control-thumbs {
        flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px;
        scrollbar-width: thin;
    }
    body.rt-product .woocommerce-product-gallery .flex-control-thumbs li { flex: 0 0 auto; }
}

/* =========================================================================
   Product page — kill any horizontal overflow (gallery strip before JS, etc.)
   ========================================================================= */
body.rt-product { overflow-x: clip; }
body.rt-product .woocommerce-product-gallery {
    overflow: hidden !important;
    max-width: 100%;
}
