/* ==========================================
   1. GLOBAL & SHARED PRODUCT STYLES
   ========================================== */
:root {
    --rb-premium-grey: #f4f4f4;
    --rb-accent-blue: #00cbff;
    --rb-text-main: #111111;
    --rb-text-muted: #888888;
    --rb-border-light: #eeeeee;
    --rb-border-medium: #e5e5e5;
    --rb-transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --rb-fade-speed: 0.8s;
}

p { margin-bottom: 15px !important; }

.woocommerce div.product p.price {
    font-size: 1.2em;
    color: var(--rb-text-main);
    font-weight: 800;
}

/* --- Size Guide Trigger (The <a> tag) --- */
.rebellionbeat-sc-wrapper { 
    margin: 15px 0; 
    display: block; 
}

#gm-open-chart.gm-trigger {
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #000;
    transition: opacity 0.2s ease;
    border: none;
    background: none;
    padding: 0;
}

#gm-open-chart.gm-trigger:hover {
    opacity: 0.6;
    text-decoration: none;
}

/* --- Modal & Overlay --- */
.gm-overlay { 
    display: none; 
    position: fixed; 
    z-index: 999999; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background: rgba(0,0,0,0.8); 
    backdrop-filter: blur(4px); 
}

.gm-modal { 
    background: #fff; 
    margin: 30px auto; 
    width: 90%; 
    max-width: 700px; 
    border-radius: 12px; 
    position: relative; 
    max-height: 85vh; 
    overflow: hidden; 
}

.gm-scroll-area { 
    overflow-y: auto; 
    max-height: 85vh; 
    padding: 30px; 
}

.gm-close { 
    position: absolute; 
    right: 15px; 
    top: 10px; 
    font-size: 28px; 
    cursor: pointer; 
    z-index: 10; 
    color: #888; 
}

.gm-badge { 
    background: #eee; 
    padding: 2px 8px; 
    font-size: 11px; 
    border-radius: 4px; 
    display: inline-block; 
    margin-top: 5px; 
}

.gm-switcher { 
    margin: 20px 0; 
    background: #f5f5f5; 
    display: inline-flex; 
    padding: 4px; 
    border-radius: 8px; 
}

.gm-tab { 
    border: none; 
    background: none; 
    padding: 6px 15px; 
    cursor: pointer; 
    font-size: 13px; 
    font-weight: bold; 
    border-radius: 6px; 
}

.gm-tab.active { 
    background: #fff; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

.gm-flex { display: flex; gap: 20px; margin-top: 20px; }
.gm-table-col { flex: 1; }
.gm-img-col { flex: 1; text-align: center; }
.gm-img-col img { max-width: 100%; height: auto; border-radius: 8px; }
.gm-table { width: 100%; border-collapse: collapse; }
.gm-table th { text-align: left; font-size: 12px; color: #999; border-bottom: 2px solid #eee; padding: 10px 5px; }
.gm-table td { padding: 12px 5px; border-bottom: 1px solid #f9f9f9; }

@media (max-width: 600px) { .gm-flex { flex-direction: column-reverse; } }

/* --- WooCommerce Cleanup --- */
.woocommerce.single .quantity input { display: none; }
.woocommerce.single .entry-summary > form.cart { border: none; padding: 0; }
.woocommerce div.product form.cart .reset_variations { display: none !important; }

/* --- Swatches & Size Buttons --- */
.rb-size-swatches { 
    display: flex !important; 
    gap: 10px; 
    margin: 15px 0; 
    flex-wrap: wrap; 
}

.rb-size-btn {
    min-width: 53px; 
    height: 40px; 
    border: 1px solid var(--rb-border-medium);
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 16px; 
    font-weight: 400; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    background: #fff;
    color: #000;
}

.rb-size-btn.selected { 
    background: #000; 
    color: #fff; 
    border-color: #000; 
}

.rb-size-btn:hover:not(.selected) {
    border-color: #000;
}

/* --- Accordion & Badges --- */
.rb-accordion { margin-top: 30px; border-top: 1px solid #000; }
.rb-acc-item.is-open { background-color: var(--rb-premium-grey) !important; }
.rb-acc-btn { width: 100%; background: none; border: none; padding: 20px 15px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.rb-acc-btn span { display: flex; align-items: center; gap: 16px; font-size: 16px; font-weight: 400; text-transform: uppercase; letter-spacing: 1.5px; }
.rb-icon { width: 20px; height: 20px; flex-shrink: 0; }
.rb-acc-content { max-height: 0; overflow: hidden; padding: 0 20px; transition: all var(--rb-transition); opacity: 0; }
.rb-acc-item.is-open .rb-acc-content { opacity: 1; padding: 10px 20px 25px; }

.rb-trust-badges { display: flex !important; justify-content: space-around; padding: 12px 0; border-top: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2; }
.rb-badge-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.rb-badge-item span { font-size: 11px; font-weight: 700; margin-top: 6px; text-transform: uppercase; color: #0b0b0b; }
.rb-badge-item svg { width: 35px; height: 35px; color: #0b0b0b; stroke-width: 1.5px; }

/* ==========================================
   2. DESKTOP & MOBILE LAYOUT
   ========================================== */
@media (min-width: 769px) {
    .nv-single-product-top { display: block; }
    .woocommerce div.product p.price { text-align: right; }
}

@media only screen and (max-width: 768px) {
    .summary.entry-summary { display: flex !important; flex-direction: column !important; }
    .woocommerce-product-gallery { max-height: 50vh !important; margin-bottom: 10px !important; }
    .product_title { order: 2 !important; font-size: 20px !important; }
    .woocommerce div.product p.price { order: 3 !important; justify-content: flex-end !important; }
    .rebellionbeat-sc-wrapper { order: 4 !important; }
    .variations_form.cart { order: 5 !important; }
    .rb-trust-badges { order: 6 !important; }
    .rb-accordion { order: 7 !important; }
    .rb-size-btn { min-width: 48px !important; height: 35px !important; font-size: 14px; }
}

/* =========================================================
   REBELLIONBEAT: TEXT STYLING
   ========================================================= */
.woocommerce div.product form.cart .variations th label {
    font-family: 'Staatliches' !important;
    font-size: .9em !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #000;
}

.rb-selected-value.rb-fade-in {
    font-family: var(--bodyfontfamily, monospace) !important;
    font-weight: 400 !important;
    font-size: 1em !important;
    color: #000 !important;
    margin-left: 2px;
	letter-spacing: 0px;
	text-transform: capitalize !important;
}

/* ==========================================
   4. PRODUCTION NOTES & EXTRA DETAILS
   ========================================== */
.production-notes { background-color: var(--rb-premium-grey); border-left: 2px solid #000; padding: 25px; margin: 40px 0; }

@media (min-width: 1200px) {
    .single-product .container { max-width: 1320px !important; }
    .woocommerce-product-gallery { width: 55% !important; float: left !important; padding-right: 40px !important; }
    .summary.entry-summary { width: 45% !important; float: right !important; }
}

.woocommerce-product-gallery__image img { transition: transform 0.5s ease; }
.woocommerce-product-gallery__image:hover img { transform: scale(1.03); }

section.exclusive ul.products.exclusive-products li.product img,
.related.products ul.products li.product img {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    border-radius: 4px;
}

section.exclusive ul.products.exclusive-products li.product:hover img,
.related.products ul.products li.product:hover img {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}