/* ================================================================
   FRACTAUDIO — WooCommerce dark-theme stylesheet
   Enqueued only on WC + WP content pages (see functions.php).
   Scoped under body.fa-scope to avoid touching the homepage.
   ================================================================ */

/* ---------------------------------------------------------------
   1) Universal content wrapper — fixes "starts at page edge"
   Astra wraps content in .site, .ast-container, .site-content,
   .entry-content. Other themes use .container, .wp-block-group, etc.
--------------------------------------------------------------- */
body.fa-scope .site,
body.fa-scope .site-content,
body.fa-scope .ast-container,
body.fa-scope main.site-main,
body.fa-scope #primary,
body.fa-scope #content {
    background: var(--fa-bg);
    color: var(--fa-ink);
}

body.fa-scope.woocommerce-page #primary,
body.fa-scope.woocommerce-page #content,
body.fa-scope.woocommerce .ast-container,
body.fa-scope.page .ast-container,
body.fa-scope.single .ast-container {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 56px 32px !important;
    width: 100%;
}

/* Headings on inner pages */
body.fa-scope .entry-title,
body.fa-scope .page-title,
body.fa-scope .woocommerce-products-header__title {
    font-family: var(--fa-sans);
    font-weight: 500;
    font-size: clamp(36px, 4.5vw, 64px);
    letter-spacing: -0.025em;
    line-height: 1;
    color: var(--fa-ink);
    margin: 0 0 32px;
}

/* Generic text */
body.fa-scope p,
body.fa-scope li,
body.fa-scope td,
body.fa-scope th,
body.fa-scope dd,
body.fa-scope dt {
    color: var(--fa-ink-dim);
}
body.fa-scope h1, body.fa-scope h2, body.fa-scope h3,
body.fa-scope h4, body.fa-scope h5, body.fa-scope h6 {
    color: var(--fa-ink);
    font-family: var(--fa-sans);
}
body.fa-scope a:not(.fa-btn):not(.fa-icon-btn):not(.fa-brand) {
    color: var(--fa-ink);
    text-decoration: underline;
    text-decoration-color: var(--fa-line-2);
    text-underline-offset: 3px;
    transition: color .15s, text-decoration-color .15s;
}
body.fa-scope a:not(.fa-btn):not(.fa-icon-btn):not(.fa-brand):hover {
    color: var(--fa-acc);
    text-decoration-color: var(--fa-acc);
}

/* ---------------------------------------------------------------
   2) Shop archive — product grid
--------------------------------------------------------------- */
body.fa-scope .woocommerce ul.products,
body.fa-scope ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 32px !important;
    margin: 0 0 56px !important;
    padding: 0 !important;
    list-style: none !important;
}
@media (max-width: 900px) {
    body.fa-scope .woocommerce ul.products,
    body.fa-scope ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
    body.fa-scope .woocommerce ul.products,
    body.fa-scope ul.products { grid-template-columns: 1fr !important; }
}

body.fa-scope ul.products li.product {
    background: var(--fa-panel);
    border: 1px solid var(--fa-line);
    border-radius: 12px;
    padding: 20px !important;
    margin: 0 !important;
    width: auto !important;
    float: none !important;
    transition: border-color .15s, transform .15s;
    list-style: none;
    display: flex; flex-direction: column;
}
body.fa-scope ul.products li.product:hover {
    border-color: var(--fa-line-2);
    transform: translateY(-2px);
}
body.fa-scope ul.products li.product img,
body.fa-scope ul.products li.product .wp-post-image {
    border-radius: 6px;
    background: #0c0c10;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 12px;
    margin: 0 0 16px !important;
}
body.fa-scope ul.products li.product .woocommerce-loop-product__title,
body.fa-scope ul.products li.product h2,
body.fa-scope ul.products li.product h3 {
    font-family: var(--fa-sans);
    font-weight: 600;
    font-size: 17px !important;
    color: var(--fa-ink) !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    letter-spacing: -0.01em;
}
body.fa-scope ul.products li.product .price {
    font-family: var(--fa-mono);
    color: var(--fa-acc) !important;
    font-size: 14px !important;
    letter-spacing: 0.02em;
    margin: 0 0 16px !important;
    font-weight: 500;
}
body.fa-scope ul.products li.product .price del {
    color: var(--fa-muted) !important;
    opacity: 0.6;
    margin-right: 6px;
}
body.fa-scope ul.products li.product .price ins {
    text-decoration: none;
    font-weight: 600;
}

body.fa-scope ul.products li.product .star-rating { margin: 0 0 12px; }
body.fa-scope .star-rating::before,
body.fa-scope .star-rating span::before { color: var(--fa-acc) !important; }

/* "Add to cart" button on shop loop */
body.fa-scope ul.products li.product .button,
body.fa-scope ul.products li.product .added_to_cart {
    background: var(--fa-acc) !important;
    color: var(--fa-acc-ink) !important;
    border: 1px solid var(--fa-acc) !important;
    border-radius: 8px !important;
    font-family: var(--fa-sans) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 10px 16px !important;
    margin: auto 0 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    transition: background .15s, border-color .15s;
    width: 100%;
    text-align: center;
    display: inline-block;
}
body.fa-scope ul.products li.product .button:hover,
body.fa-scope ul.products li.product .added_to_cart:hover {
    background: #c4ec24 !important;
    border-color: #c4ec24 !important;
    color: var(--fa-acc-ink) !important;
}

/* Sale flash */
body.fa-scope .onsale,
body.fa-scope span.onsale {
    background: var(--fa-warn) !important;
    color: var(--fa-bg) !important;
    border: 0 !important;
    font-family: var(--fa-mono) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em;
    padding: 4px 8px !important;
    border-radius: 3px !important;
    text-transform: uppercase;
    min-height: 0 !important;
    line-height: 1.2 !important;
    width: auto !important;
    height: auto !important;
    right: 12px !important;
    top: 12px !important;
    left: auto !important;
    margin: 0 !important;
}

/* Shop top: results + ordering */
body.fa-scope .woocommerce-result-count {
    font-family: var(--fa-mono);
    font-size: 11px;
    color: var(--fa-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px !important;
}
body.fa-scope .woocommerce-ordering select,
body.fa-scope .orderby {
    background: var(--fa-panel) !important;
    border: 1px solid var(--fa-line-2) !important;
    color: var(--fa-ink) !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-family: var(--fa-sans);
    font-size: 13px;
}

/* ---------------------------------------------------------------
   3) Single product page
--------------------------------------------------------------- */
body.fa-scope div.product {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 56px !important;
    align-items: start;
}
@media (max-width: 900px) {
    body.fa-scope div.product { grid-template-columns: 1fr !important; }
}
body.fa-scope div.product .woocommerce-product-gallery {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    background: var(--fa-panel);
    border: 1px solid var(--fa-line);
    border-radius: 12px;
    padding: 24px;
}
body.fa-scope div.product .woocommerce-product-gallery img {
    background: #0c0c10;
    border-radius: 6px;
}
body.fa-scope div.product .summary,
body.fa-scope div.product .entry-summary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}
body.fa-scope div.product .product_title {
    font-family: var(--fa-sans) !important;
    font-weight: 500 !important;
    font-size: 40px !important;
    letter-spacing: -0.02em !important;
    line-height: 1 !important;
    color: var(--fa-ink) !important;
    margin: 0 0 16px !important;
}
body.fa-scope div.product .price {
    font-family: var(--fa-mono) !important;
    color: var(--fa-acc) !important;
    font-size: 24px !important;
    margin: 0 0 24px !important;
}
body.fa-scope div.product .woocommerce-product-details__short-description,
body.fa-scope div.product .woocommerce-product-details__short-description p {
    color: var(--fa-ink-dim) !important;
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 24px;
}

/* Add to cart row */
body.fa-scope div.product form.cart {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin: 24px 0 !important;
    padding: 24px 0 !important;
    border-top: 1px solid var(--fa-line);
    border-bottom: 1px solid var(--fa-line);
}
body.fa-scope div.product form.cart .quantity input.qty {
    background: var(--fa-panel);
    border: 1px solid var(--fa-line-2);
    color: var(--fa-ink);
    border-radius: 6px;
    padding: 10px;
    width: 64px;
    font-family: var(--fa-mono);
    text-align: center;
}
body.fa-scope div.product form.cart .button,
body.fa-scope div.product .single_add_to_cart_button {
    background: var(--fa-acc) !important;
    color: var(--fa-acc-ink) !important;
    border: 1px solid var(--fa-acc) !important;
    border-radius: 8px !important;
    font-family: var(--fa-sans) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 12px 22px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
body.fa-scope div.product form.cart .button:hover { background: #c4ec24 !important; border-color: #c4ec24 !important; }

/* Product meta */
body.fa-scope .product_meta {
    font-family: var(--fa-mono);
    font-size: 11px;
    color: var(--fa-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-top: 16px;
    border-top: 1px solid var(--fa-line);
}
body.fa-scope .product_meta a { color: var(--fa-ink-dim); }

/* Tabs */
body.fa-scope .woocommerce-tabs ul.tabs.wc-tabs {
    border-bottom: 1px solid var(--fa-line) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex; gap: 0;
}
body.fa-scope .woocommerce-tabs ul.tabs.wc-tabs::before { display: none !important; }
body.fa-scope .woocommerce-tabs ul.tabs.wc-tabs li {
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 2px solid transparent !important;
}
body.fa-scope .woocommerce-tabs ul.tabs.wc-tabs li a {
    color: var(--fa-muted) !important;
    text-decoration: none !important;
    padding: 14px 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    display: block;
}
body.fa-scope .woocommerce-tabs ul.tabs.wc-tabs li.active {
    border-bottom-color: var(--fa-acc) !important;
}
body.fa-scope .woocommerce-tabs ul.tabs.wc-tabs li.active a { color: var(--fa-ink) !important; }
body.fa-scope .woocommerce-Tabs-panel {
    padding: 32px 0 0 !important;
    color: var(--fa-ink-dim);
}

/* ---------------------------------------------------------------
   4) Cart & Checkout — tables, totals, forms
--------------------------------------------------------------- */
body.fa-scope .shop_table,
body.fa-scope table.cart,
body.fa-scope table.shop_table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: var(--fa-panel) !important;
    border: 1px solid var(--fa-line) !important;
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 32px !important;
}
body.fa-scope .shop_table th,
body.fa-scope .shop_table td {
    background: transparent !important;
    border-color: var(--fa-line) !important;
    color: var(--fa-ink-dim) !important;
    padding: 16px !important;
    font-size: 14px;
}
body.fa-scope .shop_table thead th {
    background: #0d0d12 !important;
    color: var(--fa-muted) !important;
    font-family: var(--fa-mono);
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--fa-line) !important;
}
body.fa-scope .shop_table .product-name a { color: var(--fa-ink) !important; }
body.fa-scope .shop_table .product-price,
body.fa-scope .shop_table .product-subtotal,
body.fa-scope .shop_table .product-total,
body.fa-scope .shop_table .amount {
    font-family: var(--fa-mono);
    color: var(--fa-ink) !important;
}
body.fa-scope .shop_table .quantity input.qty {
    background: var(--fa-panel-2) !important;
    border: 1px solid var(--fa-line-2) !important;
    color: var(--fa-ink) !important;
    border-radius: 6px;
    padding: 8px;
}

/* Coupon */
body.fa-scope .coupon { display: flex; gap: 8px; }
body.fa-scope .coupon input[type="text"] {
    background: var(--fa-panel);
    border: 1px solid var(--fa-line-2);
    color: var(--fa-ink);
    border-radius: 6px;
    padding: 10px 12px;
    min-width: 200px;
}

/* Cart totals */
body.fa-scope .cart_totals,
body.fa-scope .woocommerce-checkout-review-order {
    background: var(--fa-panel);
    border: 1px solid var(--fa-line);
    border-radius: 12px;
    padding: 24px;
}
body.fa-scope .cart_totals h2,
body.fa-scope #order_review_heading,
body.fa-scope #payment .place-order { color: var(--fa-ink); }

/* All form inputs (the "black on black" fix) */
body.fa-scope input[type="text"],
body.fa-scope input[type="email"],
body.fa-scope input[type="password"],
body.fa-scope input[type="tel"],
body.fa-scope input[type="url"],
body.fa-scope input[type="number"],
body.fa-scope input[type="search"],
body.fa-scope textarea,
body.fa-scope select {
    background: var(--fa-panel) !important;
    border: 1px solid var(--fa-line-2) !important;
    color: var(--fa-ink) !important;
    border-radius: 6px !important;
    padding: 12px 14px !important;
    font-family: var(--fa-sans) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    width: 100% !important;
    box-shadow: none !important;
    transition: border-color .15s;
}
body.fa-scope input:focus,
body.fa-scope textarea:focus,
body.fa-scope select:focus {
    border-color: var(--fa-acc) !important;
    outline: 0 !important;
}
body.fa-scope input::placeholder,
body.fa-scope textarea::placeholder { color: var(--fa-muted) !important; }
body.fa-scope label {
    color: var(--fa-ink-dim) !important;
    font-family: var(--fa-mono);
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px !important;
    display: block;
    font-weight: 500 !important;
}

/* Select2 (WC uses Select2 for country dropdowns) */
body.fa-scope .select2-container--default .select2-selection--single {
    background: var(--fa-panel) !important;
    border: 1px solid var(--fa-line-2) !important;
    color: var(--fa-ink) !important;
    border-radius: 6px !important;
    height: 44px !important;
}
body.fa-scope .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--fa-ink) !important;
    line-height: 44px !important;
    padding-left: 14px !important;
}
body.fa-scope .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
}
body.fa-scope .select2-dropdown {
    background: var(--fa-panel) !important;
    border: 1px solid var(--fa-line-2) !important;
    color: var(--fa-ink) !important;
}
body.fa-scope .select2-results__option { color: var(--fa-ink-dim) !important; }
body.fa-scope .select2-results__option--highlighted {
    background: var(--fa-acc) !important;
    color: var(--fa-acc-ink) !important;
}

/* Checkboxes / radios */
body.fa-scope input[type="checkbox"],
body.fa-scope input[type="radio"] {
    accent-color: var(--fa-acc);
    width: auto !important;
    margin-right: 6px;
}

/* All WC buttons */
body.fa-scope .woocommerce a.button,
body.fa-scope .woocommerce button.button,
body.fa-scope .woocommerce input.button,
body.fa-scope .woocommerce #respond input#submit,
body.fa-scope .woocommerce-button,
body.fa-scope .checkout-button,
body.fa-scope .wc-block-components-button {
    background: var(--fa-acc) !important;
    color: var(--fa-acc-ink) !important;
    border: 1px solid var(--fa-acc) !important;
    border-radius: 8px !important;
    font-family: var(--fa-sans) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 12px 22px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: background .15s, border-color .15s;
}
body.fa-scope .woocommerce a.button:hover,
body.fa-scope .woocommerce button.button:hover,
body.fa-scope .woocommerce input.button:hover,
body.fa-scope .checkout-button:hover { background: #c4ec24 !important; border-color: #c4ec24 !important; }

/* Secondary buttons (alt) */
body.fa-scope .woocommerce a.button.alt,
body.fa-scope .woocommerce button.button.alt {
    background: var(--fa-acc) !important;
    color: var(--fa-acc-ink) !important;
}

/* "Continue shopping" / outline-style links */
body.fa-scope .return-to-shop a {
    background: transparent !important;
    color: var(--fa-ink) !important;
    border: 1px solid var(--fa-line-2) !important;
}

/* ---------------------------------------------------------------
   5) My Account
--------------------------------------------------------------- */
body.fa-scope .woocommerce-MyAccount-navigation {
    width: 25% !important;
    float: left !important;
    background: var(--fa-panel);
    border: 1px solid var(--fa-line);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 32px;
}
body.fa-scope .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.fa-scope .woocommerce-MyAccount-navigation li {
    margin: 0 !important;
    border-bottom: 1px solid var(--fa-line);
}
body.fa-scope .woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }
body.fa-scope .woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 12px 14px !important;
    color: var(--fa-ink-dim) !important;
    text-decoration: none !important;
    font-size: 14px;
    border-radius: 6px;
}
body.fa-scope .woocommerce-MyAccount-navigation li.is-active a,
body.fa-scope .woocommerce-MyAccount-navigation li a:hover {
    background: var(--fa-bg);
    color: var(--fa-acc) !important;
}
body.fa-scope .woocommerce-MyAccount-content {
    width: 70% !important;
    float: right !important;
}
@media (max-width: 768px) {
    body.fa-scope .woocommerce-MyAccount-navigation,
    body.fa-scope .woocommerce-MyAccount-content {
        width: 100% !important;
        float: none !important;
    }
}

/* ---------------------------------------------------------------
   6) Notices (success / error / info)
--------------------------------------------------------------- */
body.fa-scope .woocommerce-message,
body.fa-scope .woocommerce-info,
body.fa-scope .woocommerce-error,
body.fa-scope .wc-block-components-notice-banner {
    background: var(--fa-panel) !important;
    border: 1px solid var(--fa-line-2) !important;
    border-left: 3px solid var(--fa-acc) !important;
    color: var(--fa-ink) !important;
    border-radius: 8px !important;
    padding: 14px 18px !important;
    margin-bottom: 24px !important;
    font-size: 14px;
}
body.fa-scope .woocommerce-error { border-left-color: var(--fa-warn) !important; }
body.fa-scope .woocommerce-message::before,
body.fa-scope .woocommerce-info::before,
body.fa-scope .woocommerce-error::before { color: var(--fa-acc) !important; }
body.fa-scope .woocommerce-error::before { color: var(--fa-warn) !important; }

/* ---------------------------------------------------------------
   7) Breadcrumbs
--------------------------------------------------------------- */
body.fa-scope .woocommerce-breadcrumb {
    font-family: var(--fa-mono) !important;
    font-size: 11px !important;
    color: var(--fa-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 32px !important;
}
body.fa-scope .woocommerce-breadcrumb a { color: var(--fa-ink-dim) !important; text-decoration: none !important; }
body.fa-scope .woocommerce-breadcrumb a:hover { color: var(--fa-acc) !important; }

/* ---------------------------------------------------------------
   8) Pagination
--------------------------------------------------------------- */
body.fa-scope .woocommerce-pagination ul.page-numbers,
body.fa-scope ul.page-numbers {
    display: flex !important;
    gap: 6px !important;
    list-style: none !important;
    padding: 0 !important;
    border: 0 !important;
    margin: 32px 0 !important;
}
body.fa-scope ul.page-numbers li { border: 0 !important; margin: 0 !important; }
body.fa-scope ul.page-numbers a,
body.fa-scope ul.page-numbers span {
    background: var(--fa-panel) !important;
    border: 1px solid var(--fa-line-2) !important;
    color: var(--fa-ink-dim) !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-family: var(--fa-mono);
    font-size: 13px;
}
body.fa-scope ul.page-numbers .current {
    background: var(--fa-acc) !important;
    color: var(--fa-acc-ink) !important;
    border-color: var(--fa-acc) !important;
}

/* ---------------------------------------------------------------
   9) Page header for WC archives (Shop heading area)
--------------------------------------------------------------- */
body.fa-scope .woocommerce-products-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--fa-line);
}

/* ---------------------------------------------------------------
   10) Cart icon updates after AJAX
--------------------------------------------------------------- */
body.fa-scope .woocommerce a.added_to_cart {
    background: transparent !important;
    color: var(--fa-acc) !important;
    border: 0 !important;
    padding: 8px 0 !important;
    font-size: 12px !important;
    text-align: left !important;
}
