/*
Theme Name: ReplicaPrime Custom
Description: Custom child theme for ReplicaPrime - Luxury Replica Watches
Author: ReplicaPrime
Template: flatsome
Version: 4.0.0
Text Domain: replicaprime
*/

/* ==========================================================================
   ReplicaPrime v4.0 — Polished Design System
   Fixes: top bar hover, footer unify, sort dropdown, product tabs, filters,
   tables, cart/checkout, contact form
   ========================================================================== */

:root {
    --rp-green: #006039;
    --rp-green-dark: #00482b;
    --rp-green-light: #eef6f1;
    --rp-gold: #c5a059;
    --rp-dark: #1a1a1a;
    --rp-text: #1a1a1a;
    --rp-muted: #6b7280;
    --rp-border: #e5e7eb;
    --rp-bg: #ffffff;
    --rp-bg-soft: #f9fafb;
    --rp-gray-footer: #2a2a2a;
    --rp-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --rp-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --rp-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

/* ==========================================================================
   1. GLOBAL
   ========================================================================== */

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 400;
    color: var(--rp-text);
    background-color: var(--rp-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif !important;
    font-weight: 700 !important;
    color: var(--rp-text) !important;
    letter-spacing: -0.02em;
}

a { color: var(--rp-text); text-decoration: none !important; transition: all 0.2s ease; }
a:hover { color: var(--rp-green); }

/* ==========================================================================
   2. HEADER & TOP BAR — Fixed hover/active visibility
   ========================================================================== */

.header-wrapper, .header {
    background: var(--rp-bg) !important;
    border-bottom: 1px solid var(--rp-border) !important;
    box-shadow: var(--rp-shadow-sm) !important;
}

/* Top bar — green background, white text */
#top-bar {
    background: var(--rp-green-dark) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 0 !important;
    font-weight: 700;
}

#top-bar a, #top-bar .nav > li > a {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* FIX: Top bar hover/active — green text on light green bg, NOT white-on-white */
#top-bar .nav > li > a:hover,
#top-bar .nav > li.current-menu-item > a,
#top-bar .nav > li.current_page_item > a {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 3px;
}

/* Header main */
.header-main {
    padding: 14px 0 !important;
    background: #ffffff !important;
}

.header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Logo */
.header-logo img {
    max-height: 42px !important;
    width: auto !important;
}

/* Desktop Menu */
.header-nav ul.nav {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.nav > li > a {
    font-family: 'Lato', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--rp-text) !important;
    padding: 8px 12px !important;
    border-radius: 4px;
}

.nav > li > a:hover,
.nav > li.current-menu-item > a,
.nav > li.current-menu-parent > a {
    color: var(--rp-green) !important;
    background: var(--rp-green-light) !important;
}

/* Cart & Search */
.header-search-form {
    border: 1px solid var(--rp-border) !important;
    border-radius: 20px !important;
    overflow: hidden;
    background: var(--rp-bg-soft) !important;
}

.header-search-form input[type=text] {
    font-size: 12px !important;
    padding: 6px 14px !important;
    border: none !important;
    background: transparent !important;
}

.header-search-form button {
    background: var(--rp-green) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 14px !important;
}

.cart-icon strong {
    background: var(--rp-green) !important;
    color: #ffffff !important;
}

/* Mobile Header */
@media (max-width: 849px) {
    .header-main { padding: 8px 0 !important; }
    .header-logo img { max-height: 32px !important; }
    .header-search-form { width: 100% !important; max-width: 100% !important; margin: 8px 0 !important; }
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */

.rp-hero {
    position: relative;
    background: linear-gradient(135deg, #002d1b 0%, #00482b 50%, #006039 100%);
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    border-radius: 16px;
    margin: 20px 0 40px;
    overflow: hidden;
    box-shadow: var(--rp-shadow-md);
}

.rp-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.rp-hero h1 {
    font-size: 42px !important; font-weight: 900 !important; color: #ffffff !important;
    margin-bottom: 12px !important; text-transform: uppercase; letter-spacing: -0.01em;
}
.rp-hero p.subtitle { font-size: 15px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--rp-gold); font-weight: 700; margin-bottom: 16px; }
.rp-hero p.desc { font-size: 16px; color: rgba(255, 255, 255, 0.85); max-width: 600px; margin: 0 auto 30px; line-height: 1.6; }
.rp-hero .btn-wrap { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.rp-btn-primary {
    background: var(--rp-gold) !important; color: #1a1a1a !important; font-weight: 700 !important;
    font-size: 14px !important; padding: 14px 32px !important; border-radius: 30px !important;
    text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.25s ease !important; border: none !important;
}
.rp-btn-primary:hover { background: #ffffff !important; color: var(--rp-green-dark) !important; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.rp-btn-secondary {
    background: transparent !important; color: #ffffff !important; border: 2px solid rgba(255,255,255,0.4) !important;
    font-weight: 700 !important; font-size: 14px !important; padding: 12px 30px !important; border-radius: 30px !important;
    text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.25s ease !important;
}
.rp-btn-secondary:hover { border-color: #ffffff !important; background: rgba(255,255,255,0.1) !important; color: #ffffff !important; }

@media (max-width: 768px) {
    .rp-hero { padding: 48px 16px; margin: 10px 0 24px; }
    .rp-hero h1 { font-size: 26px !important; }
    .rp-hero p.subtitle { font-size: 12px; }
    .rp-hero p.desc { font-size: 14px; }
}

/* ==========================================================================
   3b. HEADER MAIN NAV (next to logo — Home, Shop All, About, Contact)
   ========================================================================== */

.rp-header-main-nav {
    margin-left: 30px !important;
}

.rp-header-nav {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rp-header-nav li a {
    font-family: 'Lato', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--rp-text) !important;
    padding: 8px 12px !important;
    border-radius: 4px;
    display: block;
}

.rp-header-nav li a:hover {
    color: var(--rp-green) !important;
    background: var(--rp-green-light) !important;
}

/* NOTE: Footer background colors are managed via Flatsome Customizer (Footer tab).
   Do not override them here — Customizer: Appearance → Customize → Footer */

/* ==========================================================================
   4. CATEGORY & PRODUCT CARDS
   ========================================================================== */

.product-category .overlay,
.box-category .overlay,
[class*=image_overlay] {
    background-color: transparent !important;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%) !important;
}

.product-category .box, .box-category {
    border-radius: 12px !important; overflow: hidden !important;
    border: 1px solid var(--rp-border) !important; background: #ffffff !important;
    box-shadow: var(--rp-shadow-sm) !important; transition: all 0.3s ease !important;
}
.product-category .box:hover, .box-category:hover {
    border-color: var(--rp-green) !important; box-shadow: var(--rp-shadow-md) !important; transform: translateY(-4px) !important;
}
.product-category .box-image img, .box-category .box-image img { filter: none !important; transition: transform 0.4s ease !important; }
.product-category .box:hover .box-image img, .box-category:hover .box-image img { transform: scale(1.05) !important; }
.product-category .box-text, .box-category .box-text { background: #ffffff !important; padding: 12px 10px !important; text-align: center !important; }
.product-category .box-text h3, .product-category .woocommerce-loop-category__title, .box-category .header-title {
    color: var(--rp-text) !important; font-size: 14px !important; font-weight: 700 !important;
    text-transform: uppercase !important; letter-spacing: 0.02em !important; margin: 0 0 4px !important; text-shadow: none !important;
}
.product-category .box-text .count, .box-category .count {
    color: var(--rp-green) !important; background: var(--rp-green-light) !important;
    font-size: 11px !important; font-weight: 700 !important; padding: 2px 10px !important; border-radius: 12px !important; display: inline-block !important;
}

.has-hover:hover .box-image img, .box-image img, .product-small:hover .box-image img { filter: none !important; opacity: 1 !important; }

.product-small .box {
    background: #ffffff !important; border: 1px solid var(--rp-border) !important; border-radius: 12px !important;
    overflow: hidden; transition: all 0.3s ease !important; text-align: center !important;
}
.product-small .box:hover { border-color: var(--rp-green) !important; box-shadow: var(--rp-shadow-md) !important; transform: translateY(-4px) !important; }
.product-small .box-image { background: #ffffff !important; padding: 10px; }
.product-small .product-title, .product-small .name.product-title {
    font-size: 13.5px !important; font-weight: 700 !important; color: var(--rp-text) !important;
    text-align: center !important; padding: 8px 10px 4px !important; line-height: 1.35 !important;
}
.product-small .price .amount { color: var(--rp-green) !important; font-size: 15px !important; font-weight: 700 !important; }

/* Out of stock badge */
.product-small .out-of-stock-badge,
.product-small .stock.out-of-stock {
    background: #c44 !important; color: #fff !important; padding: 3px 12px !important;
    border-radius: 4px !important; font-size: 11px !important; font-weight: 700 !important;
    text-transform: uppercase !important; display: inline-block !important;
}

/* ==========================================================================
   5. SHOP TOOLBAR & SORT DROPDOWN — Fixed rectangle-in-rectangle
   ========================================================================== */

.woocommerce-ordering {
    margin-bottom: 0 !important;
    position: relative;
}

.woocommerce-ordering select.orderby {
    display: block !important;
    width: auto !important;
    height: 38px !important;
    line-height: 36px !important;
    padding: 0 36px 0 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--rp-text) !important;
    background: #ffffff !important;
    border: 1px solid var(--rp-border) !important;
    border-radius: 8px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer;
    box-shadow: var(--rp-shadow-sm) !important;
    outline: none !important;
    margin: 0 !important;
}

.woocommerce-ordering:after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--rp-text);
    pointer-events: none;
    z-index: 1;
}

.woocommerce-ordering select.orderby:focus {
    border-color: var(--rp-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 96, 57, 0.1) !important;
}

/* ==========================================================================
   6. SIDEBAR FILTERS — Removed gray underline, kept only green
   ========================================================================== */

.sidebar-inner .widget,
.shop-sidebar .widget {
    background: #ffffff !important;
    border: 1px solid var(--rp-border) !important;
    border-radius: 12px !important;
    padding: 18px !important;
    margin-bottom: 20px !important;
    box-shadow: var(--rp-shadow-sm) !important;
}

/* FIX: Widget title — ONLY green underline, removed the gray default */
.sidebar-inner .widget-title,
.shop-sidebar .widget-title,
.sidebar-inner .widget h3,
.shop-sidebar .widget h3 {
    font-size: 13px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: var(--rp-text) !important;
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
    border-bottom: 2px solid var(--rp-green) !important;
    border-bottom-width: 2px !important;
    /* Kill Flatsome's double border */
    box-shadow: none !important;
    position: relative;
}

/* Remove any Flatsome-generated ::after line under widget titles */
.sidebar-inner .widget-title::after,
.shop-sidebar .widget-title::after,
.sidebar-inner .widget h3::after,
.shop-sidebar .widget h3::after {
    display: none !important;
    content: none !important;
}

.sidebar-inner ul li,
.shop-sidebar ul li {
    padding: 6px 0 !important;
    border-bottom: 1px dashed #f0f0f0 !important;
    font-size: 13.5px !important;
}
.sidebar-inner ul li:last-child { border-bottom: none !important; }
.sidebar-inner ul li a, .shop-sidebar ul li a { color: var(--rp-text) !important; }
.sidebar-inner ul li a:hover, .shop-sidebar ul li a:hover { color: var(--rp-green) !important; }

/* Price filter */
.widget_price_filter .ui-slider-range { background: var(--rp-green) !important; }
.widget_price_filter .ui-slider-handle {
    background: var(--rp-green) !important; border: 2px solid #ffffff !important;
    border-radius: 50% !important; top: -6px !important;
}

/* ==========================================================================
   7. FOOTER — styled to match design, colors controlled by Customizer
   ========================================================================== */

/* Footer styling — background colors set via Customizer (Footer tab).
   These styles only handle typography/spacing, NOT background colors. */

.footer-wrapper h4,
.footer-wrapper .widget-title,
#footer h4,
#footer .widget-title {
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 16px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.footer-wrapper ul, .footer-wrapper .menu,
#footer ul, #footer .menu { list-style: none !important; padding: 0 !important; margin: 0 !important; }

.footer-wrapper ul li, .footer-wrapper .menu li,
#footer ul li, #footer .menu li { padding: 5px 0 !important; line-height: 1.4 !important; }

.footer-wrapper a, #footer a { color: rgba(255, 255, 255, 0.65) !important; font-size: 13.5px !important; }
.footer-wrapper a:hover, #footer a:hover { color: #ffffff !important; }

/* Payment icons in footer */
.footer-secondary .payment-icon { opacity: 0.6; filter: grayscale(40%); }
.footer-secondary .payment-icon:hover { opacity: 1; filter: none; }

/* ==========================================================================
   8. PRODUCT PAGE TABS — Fixed green line covering text
   ========================================================================== */

/* Tab navigation */
.product-footer .tabs,
.woocommerce-tabs .tabs {
    margin-bottom: 0 !important;
    border: none !important;
}

.product-footer .tabs li,
.woocommerce-tabs .tabs li {
    background: var(--rp-bg-soft) !important;
    border: 1px solid var(--rp-border) !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    margin-right: 2px !important;
}

.product-footer .tabs li a,
.woocommerce-tabs .tabs li a {
    color: var(--rp-muted) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 10px 20px !important;
    display: block !important;
}

.product-footer .tabs li.active,
.woocommerce-tabs .tabs li.active {
    background: #ffffff !important;
    border-bottom: 1px solid #ffffff !important;
}

.product-footer .tabs li.active a,
.woocommerce-tabs .tabs li.active a {
    color: var(--rp-green) !important;
    background: transparent !important;
}

/* FIX: Remove the large green line that covers text */
.product-footer .tabs li.active a::after,
.woocommerce-tabs .tabs li.active a::after,
.product-footer .tabs li.active::after,
.woocommerce-tabs .tabs li.active::after {
    background: transparent !important;
    height: 0 !important;
    width: 0 !important;
    display: none !important;
    content: none !important;
}

/* Tab content area */
.tab-panels,
.woocommerce-tabs .woocommerce-Tabs-panel,
.product-footer .tab-content {
    border: 1px solid var(--rp-border) !important;
    border-top: 2px solid var(--rp-green) !important;
    border-radius: 0 0 8px 8px !important;
    padding: 24px !important;
    background: #ffffff !important;
    margin-top: -1px !important;
}

/* ==========================================================================
   9. PRODUCT TABLES — Specifications & Additional info restyled
   ========================================================================== */

.woocommerce-Tabs-panel table,
.woocommerce-product-attributes,
.shop_attributes,
.woocommerce-product-attributes table {
    width: 100% !important;
    border: none !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 0 20px 0 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: var(--rp-shadow-sm) !important;
}

.woocommerce-Tabs-panel table th,
.woocommerce-product-attributes th,
.shop_attributes th {
    background: var(--rp-green-light) !important;
    color: var(--rp-green-dark) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 12px 16px !important;
    text-align: left !important;
    border: none !important;
    border-bottom: 1px solid var(--rp-border) !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: 35% !important;
}

.woocommerce-Tabs-panel table td,
.woocommerce-product-attributes td,
.shop_attributes td {
    padding: 12px 16px !important;
    border: none !important;
    border-bottom: 1px solid var(--rp-border) !important;
    font-size: 13.5px !important;
    color: var(--rp-text) !important;
    background: #ffffff !important;
}

.woocommerce-Tabs-panel table tr:last-child th,
.woocommerce-Tabs-panel table tr:last-child td,
.woocommerce-product-attributes tr:last-child th,
.woocommerce-product-attributes tr:last-child td,
.shop_attributes tr:last-child th,
.shop_attributes tr:last-child td {
    border-bottom: none !important;
}

/* Also fix generic tables in descriptions */
.product-footer .tab-content table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 0 20px !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: var(--rp-shadow-sm) !important;
}

.product-footer .tab-content table th {
    background: var(--rp-green-light) !important;
    color: var(--rp-green-dark) !important;
    font-weight: 700 !important;
    padding: 10px 14px !important;
    border: none !important;
    border-bottom: 1px solid var(--rp-border) !important;
    font-size: 12px !important;
    text-transform: uppercase;
}

.product-footer .tab-content table td {
    padding: 10px 14px !important;
    border: none !important;
    border-bottom: 1px solid var(--rp-border) !important;
    font-size: 13px !important;
}

/* ==========================================================================
   10. CATEGORY DESCRIPTION — Better formatting
   ========================================================================== */

.term-description {
    background: #ffffff !important;
    border: 1px solid var(--rp-border) !important;
    border-radius: 12px !important;
    padding: 20px 24px !important;
    margin-bottom: 20px !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    color: var(--rp-text) !important;
    box-shadow: var(--rp-shadow-sm) !important;
}

.term-description h2,
.term-description h3 {
    color: var(--rp-green) !important;
    font-size: 16px !important;
    margin-top: 18px !important;
    margin-bottom: 8px !important;
    font-weight: 700 !important;
}

.term-description p { margin-bottom: 12px !important; }
.term-description ul, .term-description ol { padding-left: 20px !important; margin-bottom: 12px !important; }
.term-description li { margin-bottom: 4px !important; }

/* Category H1 */
.rp-category-h1 {
    font-size: 24px !important; font-weight: 900 !important; margin: 20px 0 10px !important;
    color: #1a1a1a !important; text-transform: uppercase !important; letter-spacing: -0.01em;
}

/* ==========================================================================
   11. CONTACT FORM 7 — Styled like superclonevalley.com
   ========================================================================== */

.cf7-contact-form,
.wpcf7 {
    max-width: 700px;
    margin: 0 auto;
}

.cf7-contact-form label,
.wpcf7-form label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--rp-text) !important;
    margin-bottom: 4px !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cf7-contact-form input[type="text"],
.cf7-contact-form input[type="email"],
.cf7-contact-form input[type="tel"],
.cf7-contact-form textarea,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid var(--rp-border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: 'Lato', sans-serif !important;
    color: var(--rp-text) !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: var(--rp-shadow-sm) !important;
}

.cf7-contact-form input:focus,
.cf7-contact-form textarea:focus,
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    border-color: var(--rp-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 96, 57, 0.1) !important;
}

.cf7-contact-form input::placeholder,
.cf7-contact-form textarea::placeholder,
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
    color: var(--rp-muted) !important;
    font-weight: 400 !important;
}

/* Submit button */
.cf7-contact-form input[type="submit"],
.wpcf7-form input[type="submit"] {
    background: var(--rp-green) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 40px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 30px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    width: auto !important;
}

.cf7-contact-form input[type="submit"]:hover,
.wpcf7-form input[type="submit"]:hover {
    background: var(--rp-green-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 96, 57, 0.3) !important;
}

/* CF7 row layout */
.cf7-contact-form .row { display: flex; gap: 16px; margin-bottom: 0; }
.cf7-contact-form .row .col-md-6 { flex: 1; }
.cf7-contact-form > label, .wpcf7-form > p { margin-bottom: 16px; display: block; }

@media (max-width: 768px) {
    .cf7-contact-form .row { flex-direction: column; }
}

/* CF7 validation errors */
.wpcf7-not-valid-tip { color: #d33 !important; font-size: 12px !important; }
.wpcf7-response-output {
    border-radius: 8px !important; padding: 12px 16px !important;
    font-size: 13px !important; margin-top: 16px !important;
}
.wpcf7-mail-sent-ok { background: var(--rp-green-light) !important; color: var(--rp-green) !important; border-color: var(--rp-green) !important; }

/* ==========================================================================
   12. CART & CHECKOUT — Polished unified style
   ========================================================================== */

/* Cart page */
.woocommerce-cart table.cart {
    border: 1px solid var(--rp-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.woocommerce-cart table.cart th {
    background: var(--rp-green-light) !important;
    color: var(--rp-green-dark) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 14px 12px !important;
    border: none !important;
    border-bottom: 2px solid var(--rp-green) !important;
}

.woocommerce-cart table.cart td {
    padding: 14px 12px !important;
    border: none !important;
    border-bottom: 1px solid var(--rp-border) !important;
    vertical-align: middle !important;
}

.woocommerce-cart table.cart tr:last-child td { border-bottom: none !important; }

/* Cart totals */
.cart_totals h2, .cart_totals .shop_table {
    border-radius: 12px !important;
}

.cart_totals .shop_table {
    border: 1px solid var(--rp-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.cart_totals .shop_table th {
    background: var(--rp-bg-soft) !important;
    font-weight: 700 !important;
    border: none !important;
    border-bottom: 1px solid var(--rp-border) !important;
    padding: 12px 16px !important;
}

.cart_totals .shop_table td {
    border: none !important;
    border-bottom: 1px solid var(--rp-border) !important;
    padding: 12px 16px !important;
}

/* Coupon input */
.coupon input.input-text {
    padding: 10px 14px !important;
    border: 1px solid var(--rp-border) !important;
    border-radius: 8px !important;
    font-size: 13px !important;
}

/* Checkout form — no hover flicker */
.woocommerce-checkout .checkout .form-row input.input-text,
.woocommerce-checkout .checkout .form-row textarea,
.woocommerce-checkout .checkout .form-row select {
    border: 1px solid var(--rp-border) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    outline: none !important;
}

/* Kill Flatsome hover shadow flicker on checkout inputs */
.woocommerce-checkout .checkout .form-row input.input-text:hover,
.woocommerce-checkout .checkout .form-row textarea:hover,
.woocommerce-checkout .checkout .form-row select:hover {
    box-shadow: none !important;
    border-color: var(--rp-border) !important;
}

.woocommerce-checkout .checkout .form-row input.input-text:focus,
.woocommerce-checkout .checkout .form-row textarea:focus,
.woocommerce-checkout .checkout .form-row select:focus {
    border-color: var(--rp-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 96, 57, 0.1) !important;
    outline: none !important;
}

/* Form row labels and rows — no transition flicker */
.woocommerce-checkout .form-row,
.woocommerce-checkout .form-row label {
    box-shadow: none !important;
    transition: none !important;
}

.woocommerce-checkout .form-row label {
    font-weight: 700 !important; font-size: 13px !important; color: var(--rp-text) !important;
}

/* Checkout order review table */
.woocommerce-checkout-review-order-table {
    border: 1px solid var(--rp-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.woocommerce-checkout-review-order-table th {
    background: var(--rp-green-light) !important;
    color: var(--rp-green-dark) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 12px 16px !important;
    border: none !important;
}

.woocommerce-checkout-review-order-table td {
    padding: 12px 16px !important;
    border: none !important;
    border-bottom: 1px solid var(--rp-border) !important;
}

/* Place order button */
#place_order {
    background: var(--rp-green) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 32px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 30px !important;
    text-transform: uppercase;
    width: 100% !important;
    transition: all 0.25s ease !important;
}

#place_order:hover {
    background: var(--rp-green-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 96, 57, 0.3) !important;
}

/* Buttons unified */
.button.checkout-button,
.button.wc-forward,
.checkout-button {
    background: var(--rp-green) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase;
    transition: all 0.25s ease !important;
}

.button.checkout-button:hover,
.button.wc-forward:hover,
.checkout-button:hover {
    background: var(--rp-green-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 96, 57, 0.3) !important;
}

/* Shipping method radio buttons — compact green design */
.woocommerce-shipping-methods,
.shipping__list,
ul#shipping_method {
    list-style: none !important;
    padding: 0 !important;
    margin: 4px 0 !important;
}

.woocommerce-shipping-methods li,
.shipping__list_item,
ul#shipping_method li {
    display: flex !important;
    align-items: center !important;
    padding: 6px 8px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    line-height: 1.6 !important;
}

.woocommerce-shipping-methods li:hover,
.shipping__list_item:hover,
ul#shipping_method li:hover {
    background: var(--rp-green-light) !important;
}

/* Hide native radio circle */
input.shipping_method[type=radio] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border: 2px solid var(--rp-border) !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    margin: 0 10px 0 0 !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

input.shipping_method[type=radio]:hover {
    border-color: var(--rp-green) !important;
}

/* Checked state — green border + inner dot */
input.shipping_method[type=radio]:checked {
    border-color: var(--rp-green) !important;
    background: #ffffff !important;
}

input.shipping_method[type=radio]:checked::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: var(--rp-green) !important;
}

/* Focus accessibility */
input.shipping_method[type=radio]:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 96, 57, 0.15) !important;
}

/* Label styling */
.shipping__list_label,
.woocommerce-shipping-methods label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--rp-text) !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    flex: 1;
}

.shipping__list_label .woocommerce-Price-amount,
.woocommerce-shipping-methods label .woocommerce-Price-amount {
    color: var(--rp-green) !important;
    font-weight: 900 !important;
}

/* Payment method radio buttons on checkout — same green style */
#payment ul.payment_methods li input[type=radio],
.wc_payment_methods input[type=radio] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border: 2px solid var(--rp-border) !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    margin: 0 10px 0 0 !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

#payment ul.payment_methods li input[type=radio]:hover,
.wc_payment_methods input[type=radio]:hover {
    border-color: var(--rp-green) !important;
}

#payment ul.payment_methods li input[type=radio]:checked,
.wc_payment_methods input[type=radio]:checked {
    border-color: var(--rp-green) !important;
}

#payment ul.payment_methods li input[type=radio]:checked::after,
.wc_payment_methods input[type=radio]:checked::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: var(--rp-green) !important;
}

#payment ul.payment_methods li input[type=radio]:focus-visible,
.wc_payment_methods input[type=radio]:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 96, 57, 0.15) !important;
}

/* Payment method label */
#payment ul.payment_methods li label,
.wc_payment_methods label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--rp-text) !important;
    cursor: pointer !important;
}

/* Highlight selected shipping/payment row — subtle */
.woocommerce-shipping-methods li:has(input:checked),
ul#shipping_method li:has(input:checked) {
    background: var(--rp-green-light) !important;
}

/* ==========================================================================
   13. MOBILE
   ========================================================================== */

@media (max-width: 849px) {
    .products.row-small { margin-left: -4px !important; margin-right: -4px !important; }
    .products .product-category.col,
    .products .product-small.col {
        width: 50% !important; max-width: 50% !important; flex: 0 0 50% !important;
        padding: 0 4px !important; margin-bottom: 10px !important;
    }
    .product-category .box-text h3 {
        font-size: 11px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
    }
    .product-small .product-title { font-size: 12.5px !important; line-height: 1.3 !important; }
    .term-description { padding: 16px !important; font-size: 13px !important; }
    .tab-panels, .woocommerce-tabs .woocommerce-Tabs-panel { padding: 16px !important; }

    /* Checkout — reduce excessive side padding on mobile */
    .woocommerce-checkout .checkout { padding: 0 !important; margin: 0 !important; }
    .woocommerce-checkout .checkout .form-row { padding: 0 !important; margin-bottom: 10px !important; }
    .woocommerce-checkout-review-order-table th,
    .woocommerce-checkout-review-order-table td { padding: 8px 6px !important; font-size: 12.5px !important; }
    .woocommerce-shipping-methods li,
    .shipping__list_item { padding: 4px 6px !important; font-size: 12.5px !important; }
    .shipping__list_label { font-size: 12.5px !important; }
}