/* ============================================================
   Gang Sheet Builder - Custom WooCommerce Styles
   For Blocksy Pro theme + Gang Sheet Builder plugin
   ============================================================ */

/* --- Color Variables --- */
:root {
    --gsb-primary: #2872fa;
    --gsb-primary-dark: #1559ed;
    --gsb-dark: #192a3d;
    --gsb-text: #3A4F66;
    --gsb-light-bg: #f8f9fb;
    --gsb-border: #e1e8ed;
    --gsb-card-shadow: 0 2px 12px rgba(25, 42, 61, 0.06);
    --gsb-card-shadow-hover: 0 8px 30px rgba(25, 42, 61, 0.12);
    --gsb-radius: 8px;
    --gsb-radius-lg: 12px;
}

/* ============================================================
   SHOP / PRODUCT ARCHIVE PAGE
   ============================================================ */

/* Hero section for shop page */
[data-prefix="woo_categories"] .hero-section[data-type="type-2"] {
    background: linear-gradient(135deg, #f8f9fb 0%, #eef2f7 100%);
    padding: 40px 0 30px;
}

[data-prefix="woo_categories"] .hero-section .page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--gsb-dark);
    letter-spacing: -0.02em;
}

/* Product grid - force 3 columns on desktop */
ul.products.columns-4,
ul.products.columns-3 {
    --shop-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

/* Product cards */
[data-products] .product {
    background: #ffffff;
    border-radius: var(--gsb-radius-lg);
    overflow: hidden;
    box-shadow: var(--gsb-card-shadow);
    transition: all 0.3s ease;
    padding-bottom: 20px;
    border: 1px solid var(--gsb-border);
}

[data-products] .product:hover {
    box-shadow: var(--gsb-card-shadow-hover);
    transform: translateY(-3px);
}

/* Product image in card */
[data-products] .product figure {
    margin: 0;
    overflow: hidden;
    border-radius: var(--gsb-radius-lg) var(--gsb-radius-lg) 0 0;
}

[data-products] .product figure .ct-media-container {
    border-radius: 0;
}

[data-products] .product figure img {
    transition: transform 0.4s ease;
}

[data-products] .product:hover figure img {
    transform: scale(1.03);
}

/* Product title in card */
[data-products] .woocommerce-loop-product__title {
    padding: 0 20px;
    margin-top: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--gsb-dark);
    line-height: 1.3;
}

[data-products] .woocommerce-loop-product__title a {
    color: inherit;
    text-decoration: none;
}

/* Product price in card */
[data-products] .product .price {
    padding: 0 20px;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gsb-primary);
}

/* Product description/excerpt in card */
[data-products] .product .woocommerce-loop-product__desc,
[data-products] .product .entry-excerpt {
    padding: 0 20px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gsb-text);
    opacity: 0.85;
}

[data-products] .product .entry-excerpt p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide category meta on archive */
[data-products] .product .entry-meta {
    display: none;
}

/* Add to cart / Select options button in card */
[data-products] .ct-woo-card-actions {
    padding: 12px 20px 0;
}

[data-products] .ct-woo-card-actions .button {
    width: 100%;
    text-align: center;
    background: var(--gsb-primary);
    color: #fff;
    border: none;
    border-radius: var(--gsb-radius);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.2s ease;
}

[data-products] .ct-woo-card-actions .button:hover {
    background: var(--gsb-primary-dark);
    color: #fff;
}

/* Sort / results count bar */
.woo-listing-top {
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--gsb-border);
    margin-bottom: 30px;
}

.woo-listing-top .woocommerce-result-count {
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--gsb-text);
    opacity: 0.7;
}

.woo-listing-top .woocommerce-ordering select {
    border-radius: var(--gsb-radius);
    border-color: var(--gsb-border);
    padding: 8px 12px;
    font-size: 14px;
}


/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */

/* Breadcrumbs */
.ct-breadcrumbs {
    padding: 16px 0 8px;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--gsb-text);
    opacity: 0.7;
}

.ct-breadcrumbs a {
    color: var(--gsb-primary);
    text-decoration: none;
}

.ct-breadcrumbs a:hover {
    text-decoration: underline;
}

/* Product title on single page */
.single-product .product_title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gsb-dark);
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 12px;
}

/* Price on single page */
.single-product .entry-summary .price {
    font-size: 22px;
    font-weight: 700;
    color: var(--gsb-primary);
}

/* Variation selector table */
.single-product .variations {
    border: none;
    margin-bottom: 16px;
}

.single-product .variations th.label {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gsb-dark);
    padding: 12px 12px 12px 0;
    vertical-align: middle;
}

.single-product .variations td.value select {
    border: 2px solid var(--gsb-border);
    border-radius: var(--gsb-radius);
    padding: 10px 14px;
    height: auto;
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s ease;
    width: 100%;
    max-width: 100%;
}

.single-product .variations td.value select:focus {
    border-color: var(--gsb-primary);
    outline: none;
}

/* Reset variations link */
.single-product .reset_variations {
    font-size: 13px;
    color: var(--gsb-primary);
    margin-left: 8px;
}

/* Single product image area - ensure placeholder looks ok */
.single-product .woocommerce-product-gallery {
    border-radius: var(--gsb-radius-lg);
    overflow: hidden;
}

.single-product .woocommerce-product-gallery .ct-media-container img {
    border-radius: var(--gsb-radius-lg);
}

/* Entry summary spacing */
.single-product .entry-summary.entry-summary-items {
    padding-top: 10px;
}

/* Product divider */
.single-product .ct-product-divider {
    opacity: 0.3;
}

/* Short description */
.single-product .woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--gsb-text);
}

/* Product tabs - ensure clean styling */
.woocommerce-tabs .tabs {
    border-bottom: 2px solid var(--gsb-border);
}

.woocommerce-tabs .tabs li a {
    font-weight: 600;
    font-size: 14px;
}

/* Related products section */
.related.products,
.up-sells.upsells {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--gsb-border);
}

.related.products > h2,
.up-sells.upsells > h2,
.related .ct-module-title,
.up-sells .ct-module-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gsb-dark);
    margin-bottom: 24px;
}


/* ============================================================
   CART PAGE
   ============================================================ */

/* Block-based cart styling */
.wc-block-cart .wc-block-cart__main {
    border-radius: var(--gsb-radius-lg);
}

.wc-block-cart .wc-block-components-product-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--gsb-dark);
}

.wc-block-cart .wc-block-cart-items .wc-block-cart-items__row {
    border-bottom-color: var(--gsb-border);
    padding: 20px 0;
}

/* Cart totals sidebar */
.wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
    border-color: var(--gsb-border);
}

/* Proceed to checkout button */
.wc-block-cart .wc-block-cart__submit-button,
.wc-block-cart .wc-block-components-checkout-place-order-button {
    background: var(--gsb-primary);
    border-radius: var(--gsb-radius);
    font-weight: 600;
    font-size: 16px;
    padding: 14px 24px;
    transition: background 0.2s ease;
}

.wc-block-cart .wc-block-cart__submit-button:hover {
    background: var(--gsb-primary-dark);
}

/* Empty cart page */
.wc-block-cart .wc-block-cart__empty-cart__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gsb-dark);
}

/* Classic cart fallback (shortcode) */
.ct-woocommerce-cart-form .shop_table {
    border-radius: var(--gsb-radius-lg);
    overflow: hidden;
}

.ct-woocommerce-cart-form .shop_table th {
    background: var(--gsb-light-bg);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gsb-text);
    padding: 14px 16px;
}

.ct-woocommerce-cart-form .shop_table td {
    padding: 16px;
    vertical-align: middle;
}

/* Cart item thumbnail - make gang sheet thumbnails look good */
.ct-woocommerce-cart-form .product-thumbnail img,
.wc-block-cart-items .wc-block-components-product-image img {
    border-radius: var(--gsb-radius);
    border: 1px solid var(--gsb-border);
}

/* Cart totals box */
.cart_totals {
    border-radius: var(--gsb-radius-lg);
    overflow: hidden;
}

.cart_totals .shop_table {
    border-radius: var(--gsb-radius);
}

.cart_totals .checkout-button {
    background: var(--gsb-primary);
    border-radius: var(--gsb-radius);
    font-weight: 600;
    font-size: 16px;
    padding: 14px 24px;
    transition: background 0.2s ease;
    width: 100%;
}

.cart_totals .checkout-button:hover {
    background: var(--gsb-primary-dark);
}


/* ============================================================
   CHECKOUT PAGE
   ============================================================ */

/* Block checkout styling */
.wc-block-checkout {
    --wp--style--block-gap: 0;
}

.wc-block-checkout .wc-block-components-text-input input,
.wc-block-checkout .wc-block-components-text-input textarea {
    border-radius: var(--gsb-radius);
    border-color: var(--gsb-border);
    transition: border-color 0.2s ease;
}

.wc-block-checkout .wc-block-components-text-input input:focus,
.wc-block-checkout .wc-block-components-text-input textarea:focus {
    border-color: var(--gsb-primary);
    box-shadow: 0 0 0 1px var(--gsb-primary);
}

/* Checkout section headings */
.wc-block-checkout .wc-block-components-checkout-step__heading {
    font-weight: 700;
    font-size: 18px;
    color: var(--gsb-dark);
}

/* Order summary in checkout */
.wc-block-checkout .wc-block-components-order-summary {
    border-radius: var(--gsb-radius-lg);
    overflow: hidden;
}

.wc-block-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name {
    font-weight: 600;
    color: var(--gsb-dark);
}

/* Place order button */
.wc-block-checkout .wc-block-components-checkout-place-order-button {
    background: var(--gsb-primary);
    border-radius: var(--gsb-radius);
    font-weight: 700;
    font-size: 16px;
    padding: 16px 32px;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wc-block-checkout .wc-block-components-checkout-place-order-button:hover {
    background: var(--gsb-primary-dark);
}

/* Checkout totals */
.wc-block-checkout .wc-block-components-totals-wrapper {
    border-color: var(--gsb-border);
}

.wc-block-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gsb-dark);
}

/* Classic checkout form (fallback) */
.woocommerce-checkout .woocommerce-input-wrapper input,
.woocommerce-checkout .woocommerce-input-wrapper select {
    border-radius: var(--gsb-radius);
    border: 2px solid var(--gsb-border);
    padding: 12px 14px;
    transition: border-color 0.2s ease;
}

.woocommerce-checkout .woocommerce-input-wrapper input:focus,
.woocommerce-checkout .woocommerce-input-wrapper select:focus {
    border-color: var(--gsb-primary);
    outline: none;
}

/* Order review on checkout */
.ct-order-review {
    border-radius: var(--gsb-radius-lg);
}


/* ============================================================
   HEADER IMPROVEMENTS
   ============================================================ */

/* Ensure header is clean */
.ct-header .site-title a {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Navigation items */
.ct-header .menu > li > a {
    font-weight: 600;
    text-transform: none;
    font-size: 14px;
    letter-spacing: 0.01em;
}

/* Dropdown menus */
.ct-header .sub-menu {
    border-radius: var(--gsb-radius);
    overflow: hidden;
    min-width: 220px;
}


/* ============================================================
   WOOCOMMERCE NOTICES
   ============================================================ */

.woocommerce-message,
.wc-block-components-notice-banner.is-success {
    border-radius: var(--gsb-radius);
    border-left: 4px solid #22c55e;
    background: #f0fdf4;
    color: #166534;
}

.woocommerce-info,
.wc-block-components-notice-banner.is-info {
    border-radius: var(--gsb-radius);
    border-left: 4px solid var(--gsb-primary);
    background: #eff6ff;
    color: #1e40af;
}

.woocommerce-error,
.wc-block-components-notice-banner.is-error {
    border-radius: var(--gsb-radius);
    border-left: 4px solid #ef4444;
}


/* ============================================================
   GANG SHEET PLUGIN-SPECIFIC OVERRIDES
   ============================================================ */

/* The GS plugin hides add-to-cart and shows its editor button instead.
   Make sure the product page doesn't look broken with the hidden button. */
.single-product .variations_form .single_variation_wrap {
    min-height: auto;
}

/* Gang sheet extra options table - ensure clean display */
.gs-extra-options {
    margin-top: 16px;
}

.gs-extra-options .gs-option-table {
    border-radius: var(--gsb-radius);
    overflow: hidden;
    border: 1px solid var(--gsb-border);
}

.gs-extra-options .gs-option-table thead th {
    background: var(--gsb-light-bg);
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--gsb-border);
}

.gs-extra-options .gs-option-table tbody tr:hover {
    background: var(--gsb-light-bg);
}

/* Gang sheet cart item details */
.woocommerce-cart .gs-cart-item-details,
.wc-block-cart .gs-cart-item-details {
    font-size: 13px;
    color: var(--gsb-text);
    line-height: 1.6;
}


/* ============================================================
   MY ACCOUNT PAGE
   ============================================================ */

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--gsb-radius);
    font-weight: 500;
    color: var(--gsb-text);
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--gsb-light-bg);
    color: var(--gsb-primary);
}


/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 999px) {
    ul.products.columns-4,
    ul.products.columns-3 {
        --shop-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .single-product .product_title {
        font-size: 24px;
    }
}

@media (max-width: 689px) {
    ul.products.columns-4,
    ul.products.columns-3 {
        --shop-columns: repeat(1, minmax(0, 1fr));
        gap: 16px;
    }

    [data-products] .product {
        padding-bottom: 16px;
    }

    [data-products] .woocommerce-loop-product__title {
        padding: 0 16px;
        font-size: 16px;
    }

    [data-products] .product .price {
        padding: 0 16px;
    }

    [data-products] .ct-woo-card-actions {
        padding: 10px 16px 0;
    }

    .single-product .product_title {
        font-size: 22px;
    }

    .single-product .entry-summary .price {
        font-size: 18px;
    }

    /* Stack the product image and summary on mobile */
    .single-product .product-entry-wrapper {
        flex-direction: column;
    }
}


/* ============================================================
   FOOTER
   ============================================================ */

.ct-footer {
    margin-top: 40px;
}

.ct-footer [data-id="copyright"] {
    font-size: 13px;
    color: var(--gsb-text);
    opacity: 0.7;
}
