/**
 * Rosewood Industrial Platform — WooCommerce Overrides
 *
 * Design System:
 *   Primary:    #E63329 (Rosewood Red)
 *   Charcoal:   #1C1C1E
 *   Warm Gray:  #f4f3f1
 *   Border:     #e8e6e3
 *   Text:       #1C1C1E / #666 / #999
 *   Font:       'Outfit', sans-serif
 *
 * @package Rosewood
 * @version 2.0.0
 */

/* ═══════════════════════════════════════════════════════
 * 0. BASE / FONT OVERRIDE
 * ═══════════════════════════════════════════════════════ */

.woocommerce-active .site-main,
.woocommerce ul.products,
.woocommerce div.product,
.woocommerce .woocommerce-ordering,
.woocommerce-page {
    font-family: 'Outfit', sans-serif;
}

/* ═══════════════════════════════════════════════════════
 * 1. CATALOG HERO (dark banner)
 * ═══════════════════════════════════════════════════════ */

.rw-catalog-hero {
    background: #1C1C1E;
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
}

.rw-catalog-hero .container {
    position: relative;
    z-index: 2;
}

.rw-hero-gradient {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(135deg, transparent 50%, rgba(230, 51, 41, 0.08) 100%);
    pointer-events: none;
}

.rw-section-tag {
    display: inline-block;
    padding: 4px 14px;
    margin-bottom: 16px;
    border: 1px solid #E63329;
    font-size: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #E63329;
    line-height: 1.6;
}

.rw-catalog-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.1;
}

.rw-catalog-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    max-width: 520px;
    line-height: 1.7;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════
 * 2. CATEGORY FILTER PILLS
 * ═══════════════════════════════════════════════════════ */

.rw-category-filter {
    background: #fff;
    border-bottom: 1px solid #e8e6e3;
    position: sticky;
    top: 0;
    z-index: 90;
}

.rw-filter-scroll {
    display: flex;
    gap: 4px;
    padding: 14px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rw-filter-scroll::-webkit-scrollbar { display: none; }

.rw-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: transparent;
    color: #888;
    font-size: 11px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.rw-filter-pill:hover {
    color: #1C1C1E;
    background: #f4f3f1;
}

.rw-filter-pill.active {
    background: #1C1C1E;
    color: #fff;
}

.rw-pill-count {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.5;
}
.rw-filter-pill.active .rw-pill-count {
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════
 * 3. USP BAR
 * ═══════════════════════════════════════════════════════ */

.rw-usp-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background: #1C1C1E;
    border-bottom: 3px solid #E63329;
    margin-bottom: 32px;
}

.rw-usp-item {
    flex: 1 1 200px;
    padding: 14px 24px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.rw-usp-item:last-child { border-right: none; }

.rw-usp-icon {
    font-size: 18px;
    line-height: 1;
}

.rw-usp-text {
    text-align: left;
}
.rw-usp-text strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.3;
}
.rw-usp-text span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════
 * 4. CATALOG TOOLBAR
 * ═══════════════════════════════════════════════════════ */

.rw-catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 16px;
    margin-bottom: 8px;
}

.rw-result-count {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: #aaa;
}

.rw-catalog-content .woocommerce-ordering select.orderby {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
    border: 1px solid #ddd;
    border-bottom-width: 1px;
    padding: 7px 36px 7px 14px;
    height: auto;
    line-height: normal;
    background-position: calc(100% - 14px) center;
}

/* ═══════════════════════════════════════════════════════
 * 5. PRODUCT GRID — SYSTEM CARDS
 * ═══════════════════════════════════════════════════════ */

.rw-catalog-content .content-product-wrapper {
    padding: 0;
}

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(var(--rw-grid-cols, 4), 1fr);
    gap: 24px;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product.rw-system-card {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0;
    background: #fff;
    border: 1px solid #e8e6e3;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    list-style: none;
    animation: rwFadeSlideUp 0.5s ease both;
}

.woocommerce ul.products li.product.rw-system-card:hover {
    border-color: #E63329;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* Staggered animation */
.rw-system-card:nth-child(1)  { animation-delay: 0s; }
.rw-system-card:nth-child(2)  { animation-delay: 0.06s; }
.rw-system-card:nth-child(3)  { animation-delay: 0.12s; }
.rw-system-card:nth-child(4)  { animation-delay: 0.18s; }
.rw-system-card:nth-child(5)  { animation-delay: 0.24s; }
.rw-system-card:nth-child(6)  { animation-delay: 0.30s; }
.rw-system-card:nth-child(7)  { animation-delay: 0.36s; }
.rw-system-card:nth-child(8)  { animation-delay: 0.42s; }
.rw-system-card:nth-child(9)  { animation-delay: 0.48s; }
.rw-system-card:nth-child(10) { animation-delay: 0.54s; }
.rw-system-card:nth-child(11) { animation-delay: 0.60s; }
.rw-system-card:nth-child(12) { animation-delay: 0.66s; }

@keyframes rwFadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Card link wrapper */
.rw-card-link-wrap {
    display: block;
    text-decoration: none;
}

/* Card image area */
.rw-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eee;
}

.rw-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    border: none !important;
    margin: 0 !important;
}

.rw-system-card:hover .rw-card-media img {
    transform: scale(1.03);
}

/* System badge on image */
.rw-system-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9), rgba(28, 28, 30, 0.75));
    backdrop-filter: blur(4px);
    font-size: 9px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #E63329;
    z-index: 2;
}

/* Hover overlay */
.rw-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 28, 30, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 3;
}
.rw-system-card:hover .rw-card-overlay {
    opacity: 1;
}

.rw-card-overlay-btn {
    padding: 12px 28px;
    background: #fff;
    color: #1C1C1E;
    font-size: 11px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: translateY(8px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.rw-system-card:hover .rw-card-overlay-btn {
    transform: translateY(0);
}

/* Card info area */
.rw-card-info {
    padding: 20px 22px 24px;
}

.rw-card-category {
    display: inline-block;
    font-size: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 6px;
}

.rw-system-card .woocommerce-loop-product__title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #1C1C1E !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.rw-system-card .woocommerce-loop-product__title a {
    color: #1C1C1E !important;
    text-decoration: none;
}

.rw-card-excerpt {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    margin: 0 0 16px;
}

.rw-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

.rw-card-lead-time {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #1C1C1E;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rw-lt-icon {
    color: #E63329;
}

.rw-card-link {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #E63329;
    text-decoration: none;
    letter-spacing: 0.04em;
}

/* Hide default WC elements in cards */
.rw-system-card .price,
.rw-system-card .star-rating,
.rw-system-card .wrapper-add-to-cart,
.rw-system-card .add_to_cart_button,
.rw-system-card .added_to_cart {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════
 * 6. SINGLE PRODUCT — SYSTEM DETAIL
 * ═══════════════════════════════════════════════════════ */

.rw-single-breadcrumb-bar {
    border-bottom: 1px solid #e8e6e3;
    padding: 18px 0;
    background: #fff;
}

.rw-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.rw-breadcrumbs a { color: #999; text-decoration: none; }
.rw-breadcrumbs a:hover { color: #E63329; }
.rw-bc-item:last-child { color: #1C1C1E; font-weight: 600; }
.rw-bc-sep { display: inline-flex; align-items: center; }

/* Layout */
.rw-single-product-wrapper {
    padding: 0 0 40px;
    background: #faf9f8;
}

.rw-single-product-wrapper .content-product-wrapper {
    padding: 0;
}

.rw-product-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    padding: 40px 0 56px;
    align-items: start;
}

/* Gallery — fill the column, no whitespace */
.rw-gallery-col {
    width: 100%;
}

.rw-gallery-col .woocommerce-product-gallery {
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

.rw-gallery-col .woocommerce-product-gallery .flex-viewport,
.rw-gallery-col .woocommerce-product-gallery__image {
    border: none !important;
    background: #f4f3f1;
}

/* Only set width on the main gallery wrapper — let Flexslider handle everything inside */
.rw-gallery-col .woocommerce-product-gallery img {
    background: #f4f3f1;
}

/* Override any WC/theme inline width on the gallery */
.rw-gallery-col .woocommerce-product-gallery[style] {
    width: 100% !important;
    max-width: 100% !important;
}

.rw-gallery-col .woocommerce-product-gallery .flex-control-thumbs {
    margin-top: 12px !important;
}

.rw-gallery-col .woocommerce-product-gallery .flex-control-thumbs li img {
    border: 2px solid transparent !important;
    opacity: 0.7;
    transition: all 0.2s ease;
}
.rw-gallery-col .woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.rw-gallery-col .woocommerce-product-gallery .flex-control-thumbs li img:hover {
    border-color: #E63329 !important;
    opacity: 1;
}

/* Summary */
.rw-summary-col {
    position: sticky;
    top: 80px;
}

.rw-summary-inner .product_title {
    font-family: 'Outfit', sans-serif !important;
    font-size: clamp(24px, 2.8vw, 34px) !important;
    font-weight: 700 !important;
    color: #1C1C1E !important;
    margin: 0 0 12px !important;
    line-height: 1.2 !important;
}

/* Enquiry label (replaces price) */
.rw-pricing-model {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.rw-enquiry-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(230, 51, 41, 0.08);
    border: 1px solid rgba(230, 51, 41, 0.2);
    color: #E63329;
    font-size: 11px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.rw-enquiry-note {
    font-size: 13px;
    color: #999;
    font-family: 'Outfit', sans-serif;
}

/* Product description / excerpt */
.rw-summary-inner .woocommerce-product-details__short-description {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    line-height: 1.85;
    color: #666;
    margin-bottom: 24px;
}

.rw-summary-inner .woocommerce-product-details__short-description table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
}

.rw-summary-inner .woocommerce-product-details__short-description table th {
    text-align: left;
    font-weight: 600;
    color: #1C1C1E;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rw-summary-inner .woocommerce-product-details__short-description table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    color: #555;
}

/* RFQ Actions */
.rw-rfq-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

/* Buttons */
.rw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    font-size: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.rw-btn-primary {
    background: #E63329;
    color: #fff;
}
.rw-btn-primary:hover {
    background: #cc2920;
    color: #fff;
}

.rw-btn-outline {
    background: transparent;
    color: #1C1C1E;
    border: 1px solid #ddd;
}
.rw-btn-outline:hover {
    border-color: #1C1C1E;
    color: #1C1C1E;
}

/* Product Meta */
.rw-product-meta {
    border-top: 1px solid #e8e6e3;
    padding-top: 20px;
}

.rw-meta-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0efed;
    font-family: 'Outfit', sans-serif;
}

.rw-meta-label {
    width: 110px;
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-top: 2px;
}

.rw-meta-value {
    flex: 1;
    font-size: 13px;
    color: #555;
}
.rw-meta-value a {
    color: #555;
    text-decoration: none;
}
.rw-meta-value a:hover { color: #E63329; }

.rw-meta-highlight {
    color: #E63329 !important;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
 * 7. RFQ FORM SECTION
 * ═══════════════════════════════════════════════════════ */

.rw-rfq-section {
    background: #fff;
    border: 1px solid #e8e6e3;
    padding: 48px;
    margin-bottom: 48px;
}

.rw-rfq-header {
    margin-bottom: 32px;
}
.rw-rfq-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1C1C1E;
    margin: 8px 0;
}
.rw-rfq-header p {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: #888;
    max-width: 520px;
    line-height: 1.7;
}

.rw-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.rw-form-full {
    grid-column: 1 / -1;
}

.rw-form-field label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #999;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.rw-form-field label span {
    color: #E63329;
}

.rw-form-field input,
.rw-form-field select,
.rw-form-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    background: #faf9f8;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: #1C1C1E;
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    border-radius: 0;
}
.rw-form-field input:focus,
.rw-form-field select:focus,
.rw-form-field textarea:focus {
    border-color: #E63329;
}

.rw-btn-submit {
    min-width: 220px;
}

/* ═══════════════════════════════════════════════════════
 * 8. TABS — INDUSTRIAL STYLE
 * ═══════════════════════════════════════════════════════ */

.rw-product-middle .woocommerce-tabs {
    padding-top: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    display: flex !important;
    gap: 0;
    margin: 0 0 32px;
    padding: 0 !important;
    border-bottom: 1px solid #e8e6e3;
    text-align: left !important;
    overflow: visible;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: inline-block;
    padding: 12px 24px;
    font-family: 'Outfit', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: #aaa !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -1px;
    transition: all 0.25s ease;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    color: #1C1C1E !important;
    border-color: #ddd !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background: transparent !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: #1C1C1E !important;
    border-color: #E63329 !important;
}

.woocommerce div.product .woocommerce-tabs .panel {
    text-align: left !important;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    line-height: 1.85;
    color: #555;
    max-width: 740px;
}

/* Spec tables within description tab */
.woocommerce div.product .woocommerce-tabs .panel table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    margin: 20px 0;
}
.woocommerce div.product .woocommerce-tabs .panel table th {
    text-align: left;
    font-weight: 600;
    color: #1C1C1E;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    letter-spacing: 0.04em;
}
.woocommerce div.product .woocommerce-tabs .panel table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0efed;
    color: #555;
}
.woocommerce div.product .woocommerce-tabs .panel table abbr {
    text-decoration: none;
    border: none;
    font-weight: 600;
    color: #999;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Tab heading hidden */
.single-product .woocommerce-tabs h2 {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════
 * 9. RELATED PRODUCTS
 * ═══════════════════════════════════════════════════════ */

.related.products,
.rw-related-section {
    padding-top: 48px;
    border-top: 1px solid #e8e6e3;
}

/* Hide old WC default related heading */
.related.products > h2 {
    display: none !important;
}

.rw-related-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #1C1C1E;
    margin: 0 0 28px;
}
.rw-related-heading::before {
    content: none;
}

/* Related products grid — use our grid variable */
.rw-related-section > ul.products {
    display: grid !important;
    grid-template-columns: repeat(var(--rw-grid-cols, 4), 1fr);
    gap: 24px;
}

/* Hide any empty list items in related */
.rw-related-section > ul.products > li:empty,
.related.products > ul.products > li:empty {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════
 * 10. RFQ BANNER (bottom of catalog)
 * ═══════════════════════════════════════════════════════ */

.rw-rfq-banner {
    background: #1C1C1E;
    padding: 0;
}

.rw-rfq-banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 48px 0;
    flex-wrap: wrap;
    gap: 24px;
}

.rw-rfq-banner-text .rw-section-tag {
    border-color: #E63329;
}
.rw-rfq-banner-text h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 8px 0;
}
.rw-rfq-banner-text p {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    max-width: 500px;
    line-height: 1.6;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════
 * 11. PAGINATION
 * ═══════════════════════════════════════════════════════ */

.wc-pagination {
    margin-top: 32px;
    padding-bottom: 48px;
}

.wc-pagination .page-pagination li a,
.wc-pagination .page-pagination li span {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 13px;
}

.wc-pagination .page-pagination li span.current {
    background: #1C1C1E;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════
 * 12. RESPONSIVE
 * ═══════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    .rw-product-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .rw-summary-col {
        position: static;
    }
    .rw-rfq-section {
        padding: 32px 24px;
    }
    .rw-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rw-catalog-hero {
        padding: 48px 0 40px;
    }
    .rw-usp-bar {
        flex-direction: column;
    }
    .rw-usp-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        justify-content: flex-start;
        padding: 12px 20px;
    }
    .rw-rfq-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 36px 0;
    }
    .rw-rfq-banner-text p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .rw-catalog-title {
        font-size: 28px;
    }
    .rw-product-top {
        padding: 32px 0 40px;
    }
}

/* ═══════════════════════════════════════════════════════
 * 13. GLOBAL OVERRIDES (PARENT THEME CLEANUP)
 * ═══════════════════════════════════════════════════════ */

/* Override parent theme content wrapper padding */
.woocommerce .content-product-wrapper,
.single-product .content-product-wrapper {
    padding: 0 !important;
}

/* Override parent theme product image border */
.woocommerce ul.products li.product .product-media img {
    border: none !important;
}
.woocommerce ul.products li.product .product-media:hover img {
    border: none !important;
}

/* Override parent product title styles */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    margin-top: 0 !important;
}

/* Hide the default product-media wrapper styling */
.rw-system-card .product-media {
    position: static;
    overflow: visible;
    background: none;
}

/* Override single product gallery border and sizing */
.single-product .woocommerce-product-gallery > figure > .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery > .flex-viewport {
    border: none !important;
}

/* Force gallery to fill its grid column regardless of WC inline styles */
.rw-product-top .rw-gallery-col .woocommerce-product-gallery,
.rw-product-top .rw-gallery-col .woocommerce-product-gallery[style],
.woocommerce div.product div.images {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

.woocommerce div.product div.summary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* Override parent form.cart display (we hide it) */
.woocommerce div.product form.cart {
    display: none !important;
}

/* Button styles for category/product pages */
.rw-btn-ghost {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 28px;
    text-decoration: none;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.25s ease;
}
.rw-btn-ghost:hover { border-color: #fff; color: #fff; }

/* Kill any empty product list items and stray WC elements */
.woocommerce ul.products > li:empty,
.woocommerce ul.products > li.product-category,
.rw-related-section ul.products > li:empty {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Kill pseudo-elements that WC/parent theme may inject as grid-sizers */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.rw-related-section ul.products::before,
.rw-related-section ul.products::after {
    display: none !important;
    content: none !important;
}

/* Kill WC's "16 systems" + ordering toolbar if it somehow renders */
.rw-catalog-content .rw-catalog-toolbar,
.rw-catalog-content .woocommerce-result-count,
.rw-catalog-content .woocommerce-ordering,
.rw-catalog-content .rw-usp-bar {
    display: none !important;
}

/* ═══════════════════════════════════════════════
   CATEGORY SHOWCASE (Shop page)
   ═══════════════════════════════════════════════ */

.rw-cat-showcase { padding: 40px 0; background: #fff; border-bottom: 1px solid #e8e6e3; }

.rw-cat-showcase-grid { display: grid; grid-template-columns: repeat(var(--rw-grid-cols, 4), 1fr); gap: 12px; }

.rw-showcase-card { position: relative; display: block; text-decoration: none; overflow: hidden; border: 1px solid #e8e6e3; transition: border-color 0.3s ease; height: 220px; }
.rw-showcase-card:hover { border-color: #E63329; }
.rw-showcase-card--wide { grid-column: span 2; }
.rw-showcase-card-bg { position: absolute; inset: 0; }
.rw-showcase-card-bg img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.rw-showcase-card-bg .rw-eco-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #2a2a2c 0%, #3a3a3c 100%); }
.rw-showcase-card:hover .rw-showcase-card-bg img { transform: scale(1.04); }
.rw-showcase-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(28,28,30,0.8) 0%, rgba(28,28,30,0.1) 60%); }
.rw-showcase-card-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; z-index: 2; }
.rw-showcase-card-name { font-family: 'Outfit', sans-serif; font-size: 17px; font-weight: 600; color: #fff; margin: 0 0 2px; }
.rw-showcase-card-count { font-family: 'Outfit', sans-serif; font-size: 11px; color: rgba(255,255,255,0.5); }

/* ═══════ FILTER BAR — Updated ═══════ */
.rw-filter-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.rw-filter-result-count { font-family: 'Outfit', sans-serif; font-size: 12px; color: #aaa; white-space: nowrap; flex-shrink: 0; }

/* ═══════ CATALOG HERO — Stats ═══════ */
.rw-catalog-hero-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; flex-wrap: wrap; }
.rw-catalog-hero-stats { display: flex; gap: 32px; flex-shrink: 0; }
.rw-catalog-stat { text-align: center; }
.rw-catalog-stat-num { display: block; font-family: 'Outfit', sans-serif; font-size: 36px; font-weight: 800; color: #E63329; line-height: 1; }
.rw-catalog-stat-label { display: block; font-family: 'Outfit', sans-serif; font-size: 10px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }

/* ═══════ PRODUCT CARD — Updates ═══════ */
.rw-card-no-image { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; background: linear-gradient(135deg, #f8f7f5 0%, #eeedeb 100%); gap: 8px; }
.rw-card-no-image-icon { font-size: 32px; opacity: 0.6; }
.rw-card-no-image-text { font-family: 'Outfit', sans-serif; font-size: 10px; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: 0.08em; }
.rw-card-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; background: rgba(28,28,30,0.7); backdrop-filter: blur(8px); font-family: 'Outfit', sans-serif; font-size: 9px; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: 0.1em; z-index: 3; }
.rw-card-cat-label { display: inline-block; font-family: 'Outfit', sans-serif; font-size: 10px; font-weight: 600; color: #E63329; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; margin-bottom: 4px; transition: color 0.2s ease; }
.rw-card-cat-label:hover { color: #cc2920; }
.rw-card-footer { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rw-card-sku { font-family: 'Outfit', sans-serif; font-size: 10px; font-weight: 500; color: #bbb; background: #f4f3f1; padding: 2px 8px; letter-spacing: 0.04em; }
.rw-card-view-link { display: inline-block; font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 600; color: #E63329; text-decoration: none; letter-spacing: 0.04em; transition: color 0.2s ease; }
.rw-card-view-link:hover { color: #cc2920; }

/* ═══════ CATEGORY LANDING PAGE ═══════ */
.rw-cat-hero { background: #1C1C1E; padding: 56px 0 48px; position: relative; overflow: hidden; }
.rw-cat-hero--has-image .rw-cat-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.2; }
.rw-cat-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(28,28,30,0.92) 40%, rgba(28,28,30,0.7) 100%); }
.rw-cat-hero .container { position: relative; z-index: 2; }
.rw-cat-hero-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.rw-cat-breadcrumb { font-family: 'Outfit', sans-serif; font-size: 11px; margin-bottom: 14px; }
.rw-cat-breadcrumb a { color: rgba(255,255,255,0.4); text-decoration: none; }
.rw-cat-breadcrumb a:hover { color: #fff; }
.rw-cat-bc-sep { color: rgba(255,255,255,0.2); margin: 0 6px; }
.rw-cat-bc-current { color: rgba(255,255,255,0.6); }
.rw-cat-hero-title { font-family: 'Outfit', sans-serif; font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: #fff; margin: 0 0 10px; line-height: 1.1; }
.rw-cat-hero-desc { font-family: 'Outfit', sans-serif; font-size: 14px; color: rgba(255,255,255,0.45); max-width: 480px; line-height: 1.7; margin: 0 0 16px; }
.rw-cat-hero-meta { font-family: 'Outfit', sans-serif; font-size: 12px; color: rgba(255,255,255,0.4); }
.rw-cat-hero-meta-sep { margin: 0 8px; }
.rw-cat-hero-action { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }

/* Subcategory cards */
.rw-cat-subcats { padding: 40px 0; background: #fff; border-bottom: 1px solid #e8e6e3; }
.rw-cat-subcats-title { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 600; color: #1C1C1E; margin: 0 0 20px; }
.rw-cat-subcats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.rw-subcat-card { display: flex; border: 1px solid #e8e6e3; text-decoration: none; overflow: hidden; transition: border-color 0.3s ease; background: #fff; }
.rw-subcat-card:hover { border-color: #E63329; }
.rw-subcat-card-img { width: 80px; min-height: 80px; flex-shrink: 0; overflow: hidden; background: #eee; }
.rw-subcat-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.rw-subcat-card:hover .rw-subcat-card-img img { transform: scale(1.05); }
.rw-subcat-card-info { padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; }
.rw-subcat-name { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; color: #1C1C1E; margin: 0 0 2px; line-height: 1.3; }
.rw-subcat-count { font-family: 'Outfit', sans-serif; font-size: 11px; color: #E63329; font-weight: 500; }

/* Explore other categories */
.rw-cat-explore { padding: 64px 0; background: #f4f3f1; border-top: 1px solid #e8e6e3; }
.rw-cat-explore-grid { display: grid; grid-template-columns: repeat(var(--rw-grid-cols, 4), 1fr); gap: 20px; }
.rw-explore-card { position: relative; display: block; text-decoration: none; aspect-ratio: 3/2; overflow: hidden; border: 1px solid #e8e6e3; transition: border-color 0.3s ease; }
.rw-explore-card:hover { border-color: #E63329; }
.rw-explore-card-img { position: absolute; inset: 0; }
.rw-explore-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.rw-explore-card:hover .rw-explore-card-img img { transform: scale(1.04); }
.rw-explore-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(28,28,30,0.85) 0%, transparent 55%); }
.rw-explore-card-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 18px; z-index: 2; }
.rw-explore-card-info h3 { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 600; color: #fff; margin: 0 0 2px; }
.rw-explore-card-info span { font-family: 'Outfit', sans-serif; font-size: 11px; color: rgba(255,255,255,0.5); }

/* ═══════ PRODUCT NAVIGATION ═══════ */
.rw-product-nav { border-top: 1px solid #e8e6e3; background: #fff; }
.rw-product-nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; min-height: 80px; }
.rw-product-nav-link { display: flex; align-items: center; gap: 14px; padding: 20px 0; text-decoration: none; color: #1C1C1E; transition: color 0.25s ease; }
.rw-product-nav-link:hover { color: #E63329; }
.rw-product-nav-link svg { flex-shrink: 0; opacity: 0.4; transition: opacity 0.25s ease; }
.rw-product-nav-link:hover svg { opacity: 1; }
.rw-product-nav-next { justify-content: flex-end; text-align: right; }
.rw-product-nav-label { display: block; font-family: 'Outfit', sans-serif; font-size: 10px; font-weight: 600; color: #999; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
.rw-product-nav-title { display: block; font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; color: inherit; line-height: 1.3; }
.rw-product-nav-grid { display: flex; align-items: center; justify-content: center; padding: 20px 28px; border-left: 1px solid #e8e6e3; border-right: 1px solid #e8e6e3; color: #ccc; transition: color 0.25s ease; text-decoration: none; }
.rw-product-nav-grid:hover { color: #E63329; }
.rw-category-filter--product { border-top: 1px solid #e8e6e3; }

/* ═══════ RESPONSIVE — Category & Showcase ═══════ */
@media (max-width: 1024px) {
    .rw-cat-showcase-grid { grid-template-columns: repeat(2, 1fr); }
    .rw-showcase-card--wide { grid-column: span 1; }
    .rw-cat-explore-grid { grid-template-columns: repeat(2, 1fr); }
    .rw-catalog-hero-inner, .rw-cat-hero-inner { flex-direction: column; align-items: flex-start; }
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .rw-cat-showcase-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .rw-cat-subcats-grid { grid-template-columns: 1fr; }
    .rw-cat-explore-grid { grid-template-columns: 1fr 1fr; }
    .rw-product-nav-inner { grid-template-columns: 1fr; }
    .rw-product-nav-grid { border-left: none; border-right: none; border-top: 1px solid #e8e6e3; border-bottom: 1px solid #e8e6e3; padding: 14px; }
    .rw-catalog-hero-stats { gap: 24px; }
    .rw-cat-hero-action { flex-direction: row; }
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 480px) {
    .rw-cat-showcase-grid { grid-template-columns: 1fr; }
    .rw-cat-explore-grid { grid-template-columns: 1fr; }
    .woocommerce ul.products { grid-template-columns: 1fr; }
}
