/**
 * Shady Corner - WooCommerce Glassmorphic Overrides
 *
 * This file styles the default WooCommerce product grids and pages
 * to match the site's dark, glassmorphic theme.
 */

/* ==========================================================================
   1. Product Grid Styles (Shop, Archives, Blocks)
   ========================================================================== */

/* Style for both classic `ul.products` and modern `.wc-block-grid` */
.wc-block-grid__product,
.woocommerce ul.products li.product {
    background: rgba(30, 25, 45, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 17%;
    padding: 15px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.wc-block-grid__product:hover,
.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* Product Image */
.wc-block-grid__product .wc-block-grid__product-image,
.woocommerce ul.products li.product a img {
    border-radius: 8px;
    margin-bottom: 15px !important;
}

/* Product Title */
.wc-block-grid__product .wc-block-grid__product-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: #fff;
    font-size: 1.1em;
    padding: 0 !important;
}

/* Product Price */
.wc-block-grid__product .wc-block-grid__product-price,
.woocommerce ul.products li.product .price {
    color: #ff38a2 !important; /* Theme's accent pink */
    font-weight: bold;
}
.woocommerce ul.products li.product .price del {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* "Add to Cart" Button on Grids */
.wc-block-grid__product .wp-block-button__link,
.woocommerce ul.products li.product .button {
    background: #70399b !important;
    color: #fff !important;
    border-radius: 8px !important;
    transition: background-color 0.2s ease;
}

.wc-block-grid__product .wp-block-button__link:hover,
.woocommerce ul.products li.product .button:hover {
    background: #8c4dbb !important;
}

/* Sale Flash Badge */
.woocommerce span.onsale {
    background-color: #ff38a2;
    border-radius: 50%;
    min-height: 50px;
    min-width: 50px;
}

/* ==========================================================================
   2. Single Product Page Styles (Default Template)
   ========================================================================== */

/* Main product content area */
.single-product div.product {
    display: grid;
    grid-template-columns: 48% 1fr; /* 2-column layout for image and summary */
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .single-product div.product {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
}

/* Image gallery */
.single-product .woocommerce-product-gallery {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Summary Box (title, price, add to cart form) */
.single-product .summary.entry-summary {
    background: rgba(35, 29, 51, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    width: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.single-product .product_title {
    color: #fff;
    font-size: 2em;
    margin-bottom: 10px;
}

.single-product p.price {
     color: #ff38a2 !important;
     font-size: 1.8em;
     font-weight: bold;
}
.single-product p.price del {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.6em;
}

/* Variations Table */
.variations_form table.variations {
    background: transparent;
    width: 100%;
}
.variations_form table.variations td,
.variations_form table.variations th {
    border: none;
    padding: 8px 0;
}
.variations_form table.variations label {
    color: #fff;
    font-weight: bold;
}
.variations_form table.variations select {
    width: 100%;
}

/* Quantity Input */
.quantity .qty {
    background: rgba(15, 12, 25, 0.7) !important;
    border: 1px solid rgba(112, 57, 155, 0.8) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 10px !important;
}

/* Add to cart button area for variable products */
.single_variation_wrap {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.woocommerce-variation-add-to-cart {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Description and Tabs section */
.woocommerce-tabs.wc-tabs-wrapper {
    background: rgba(35, 29, 51, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    grid-column: 1 / -1; /* Make it span both columns */
}

.woocommerce-tabs ul.tabs {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    padding-left: 0 !important;
    margin: 0 !important;
}

.woocommerce-tabs ul.tabs::before {
    border-bottom: none !important;
}

.woocommerce-tabs ul.tabs li {
    background: rgba(0,0,0,0.2) !important;
    border-color: rgba(255,255,255,0.1) !important;
    border-radius: 8px 8px 0 0 !important;
    margin: 0 5px 0 0 !important;
}

.woocommerce-tabs ul.tabs li a {
    color: #e0e0e0 !important;
    font-weight: bold;
}

.woocommerce-tabs ul.tabs li.active {
    background: rgba(112, 57, 155, 0.3) !important;
    border-bottom-color: transparent !important;
}
.woocommerce-tabs ul.tabs li.active a {
    color: #fff !important;
}

.woocommerce-tabs .panel {
    color: #e0e0e0;
    padding: 20px !important;
    margin: 0 !important;
    background: rgba(15, 12, 25, 0.3);
    border-radius: 0 8px 8px 8px;
}
.woocommerce-tabs .panel h2 {
    display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::after, .woocommerce div.product .woocommerce-tabs ul.tabs li::before {
    display: none;
}
/* Related Products */
.related.products {
    grid-column: 1 / -1; /* Make it span both columns */
}

.related.products > h2 {
    color: #fff;
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 25px;
}

/* Full-width block below the product */
.single-product .sc-related-outside {
  padding-top: 20px;
  border-top: 2px solid #322840;
}

/* Make sure the inner related grid isn’t constrained by your product grid rules */
.single-product .sc-related-outside .related.products {
  width: 100%;
  display: block;
}

.product_cat-apparel > #sc-atc-inline,
.product_cat-dvd > #sc-atc-inline,
.product_cat-stickers > #sc-atc-inline,
.product_cat-merch-pack > #sc-atc-inline,
.product_cat-audios > #sc-atc-inline,
.product_cat-specials > #sc-atc-inline,
.product_cat-misc > #sc-atc-inline,
.product_cat.uncategorized > #sc-atc-inline,
.product_cat-acrylic-figures > #sc-atc-inline {
    grid-column: 1/-1;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   3. General Page & Form Styles (Cart, Checkout, My Account)
   ========================================================================== */

/* Main content containers */
.woocommerce-cart,
.woocommerce-checkout,
.woocommerce-account {
    color: #e0e0e0;
}

/* Form Fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce select,
.woocommerce .select2-container--default .select2-selection--single {
    background: rgba(15, 12, 25, 0.7) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(112, 57, 155, 0.8) !important;
    color: #fff !important;
    padding: 12px;
    border-radius: 8px !important;
    height: auto !important;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce select:focus {
    border-color: #ff38a2 !important;
}

.woocommerce label {
    color: #fff !important;
}

/* Buttons */
.woocommerce .button,
.woocommerce .button.alt,
.woocommerce .button.checkout,
.woocommerce button[type="submit"] {
    background: linear-gradient( to bottom, #70399b 5%, #512672 95%) !important;
    color: white !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    border: none !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}
.woocommerce .button:hover,
.woocommerce .button.alt:hover,
.woocommerce .button.checkout:hover,
.woocommerce button[type="submit"]:hover {
    background: linear-gradient( to bottom, #8343b8 5%, #612f8a 95%) !important;
    transform: scale(1.02);
}

/* ==========================================================================
   4. Cart & Checkout Specifics
   ========================================================================== */

/* Glass containers for main sections */
.woocommerce-cart-form,
.cart-collaterals,
#customer_details,
#order_review {
    background: rgba(35, 29, 51, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.woocommerce table.shop_table {
    background: transparent !important;
    border: none !important;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0;
}

.woocommerce table.shop_table th {
    color: #fff;
}

.woocommerce-cart .cart-collaterals {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}
.woocommerce-cart .cart_totals {
    background: rgba(35, 29, 51, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* ==========================================================================
   5. My Account Page Styles
   ========================================================================== */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: rgba(30, 25, 45, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    margin: 0;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    list-style: none;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    color: #e0e0e0;
    padding: 10px 15px;
    display: block;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background-color: #70399b;
    color: #fff;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background-color: rgba(255,255,255,0.1);
}

.woocommerce-account .woocommerce-MyAccount-content {
    color: #e0e0e0;
}

