/*
Theme Name: Uni-Carts
Description: Custom theme based on Twenty Twenty-Five with Uni-Cart functionality
Template: twentytwentyfive
Version: 1.0.0
*/

/* Import parent theme styles */
@import url("../twentytwentyfive/style.css");

/* Custom Uni-Carts Styling */
/* Note: Colors and spacing are now defined in theme.json */

/* Full height sections */
.fullHeight {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.redBG {
    background-color: var(--wp--preset--color--unicart-red);
    color: var(--wp--preset--color--base);
}

/* Wrap class for consistent container */
.wrap {
    max-width: var(--wp--style--global--content-size);
    margin: 0 auto;
    padding: 0 var(--wp--preset--spacing--50);
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Custom Button Variations */
.button.gold-outline {
    background-color: transparent;
    border-color: #ffd700;
    color: #ffd700;
}

.button.white-button {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--unicart-red);
    border-color: var(--wp--preset--color--base);
}

.button.white-button:hover {
    background-color: transparent;
    color: var(--wp--preset--color--base);
    border-color: var(--wp--preset--color--base);
}

/* Wobble animation for cart button */
.wobble-for-attention {
    animation: wobble 1s ease-in-out;
}

/* Custom animations using theme.json compatible approach */
@keyframes wobble {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(-5deg); }
    30% { transform: rotate(4deg); }
    45% { transform: rotate(-3deg); }
    60% { transform: rotate(2deg); }
    75% { transform: rotate(-1deg); }
    100% { transform: rotate(0deg); }
}

/* Utility classes that complement theme.json */
.has-unicart-red-background-color {
    background-color: var(--wp--preset--color--unicart-red) !important;
}

.has-unicart-yellow-background-color {
    background-color: var(--wp--preset--color--unicart-yellow) !important;
}

.has-unicart-orange-background-color {
    background-color: var(--wp--preset--color--unicart-orange) !important;
}

.has-unicart-green-background-color {
    background-color: var(--wp--preset--color--unicart-green) !important;
}

.has-unicart-red-color {
    color: var(--wp--preset--color--unicart-red) !important;
}

/* Product Grid Styles - Updated for WooCommerce Blocks */
.wc-block-product-categories,
.wc-block-products-grid,
.wc-block-all-products {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--60);
}

@media (min-width: 768px) {
    .wc-block-product-categories,
    .wc-block-products-grid,
    .wc-block-all-products {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* WooCommerce Product Card Styling */
.wc-block-grid__product,
.wc-block-product-categories__item {
    position: relative;
    padding: var(--wp--preset--spacing--70);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--wp--preset--color--contrast) 20%, transparent);
}

/* Product variations and cart modifications for WC blocks */
.wc-block-grid__product .wc-block-components-product-button {
    display: none; /* Hide default add to cart, we'll add our bulk cart */
}

/* Bulk cart interface for WooCommerce blocks */
.unicart-bulk-interface {
    margin-top: var(--wp--preset--spacing--40);
    padding: var(--wp--preset--spacing--40);
    background: color-mix(in srgb, var(--wp--preset--color--base) 95%, transparent);
    border-radius: 8px;
    border: 2px solid var(--wp--preset--color--unicart-red);
}

.unicart-bulk-interface .unicart-add-button {
    width: 100%;
    background: var(--wp--preset--color--unicart-red);
    color: var(--wp--preset--color--base);
    border: none;
    padding: var(--wp--preset--spacing--30);
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: var(--wp--preset--spacing--30);
}

.unicart-bulk-interface .unicart-add-button:hover {
    background: color-mix(in srgb, var(--wp--preset--color--unicart-red) 80%, black);
}

.unicart-bulk-interface .unicart-quantity {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--wp--preset--spacing--20);
}

.unicart-bulk-interface .unicart-quantity.show {
    display: flex;
}

.unicart-bulk-interface .quantity-controls {
    display: flex;
    gap: var(--wp--preset--spacing--10);
}

.unicart-bulk-interface .quantity-controls button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--wp--preset--color--unicart-red);
    background: var(--wp--preset--color--base);
    color: var(--wp--preset--color--unicart-red);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Cart Variations */
.cart-variations {
    list-style: none;
    padding: 0;
    margin: var(--wp--preset--spacing--60) 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--wp--preset--spacing--40);
}

.a-variation,
.unicart-variation {
    padding: var(--wp--preset--spacing--50);
    border: 2px solid transparent;
    border-radius: 8px;
    background: color-mix(in srgb, var(--wp--preset--color--base) 90%, transparent);
    text-align: center;
    transition: all 0.3s ease;
}

.a-variation h4,
.unicart-variation h4 {
    margin: 0 0 var(--wp--preset--spacing--30) 0;
    font-size: var(--wp--preset--font-size--large);
}

.a-variation .price,
.unicart-variation .price {
    font-weight: bold;
    font-size: var(--wp--preset--font-size--large);
}

.a-variation img,
.unicart-variation img {
    max-width: 100px;
    height: auto;
    margin: var(--wp--preset--spacing--30) 0;
}

.a-variation.selected,
.unicart-variation.selected {
    background: var(--wp--preset--color--base);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px color-mix(in srgb, var(--wp--preset--color--contrast) 10%, transparent);
}

/* Quantity Input */
.quantity,
.unicart-quantity {
    display: none;
    margin: var(--wp--preset--spacing--30) 0;
    align-items: center;
    justify-content: center;
}

.quantity.show,
.unicart-quantity.show {
    display: flex;
}

.quantity input.qty,
.unicart-quantity input.qty {
    width: 60px;
    text-align: center;
    padding: var(--wp--preset--spacing--20);
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 20%, transparent);
    border-radius: 4px;
}

/* Cart Summary (sticky cart summary) */
#carts-suckerfish,
#unicart-summary {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: var(--wp--preset--color--unicart-red);
    color: var(--wp--preset--color--base);
    padding: var(--wp--preset--spacing--50) 0;
    transition: bottom 0.3s ease;
    z-index: 1000;
    box-shadow: 0 -2px 10px color-mix(in srgb, var(--wp--preset--color--contrast) 20%, transparent);
}

#carts-suckerfish.in,
#carts-suckerfish.show,
#unicart-summary.show {
    bottom: 0;
}

#carts-suckerfish .wrap,
#unicart-summary .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#carts-suckerfish .total-price,
#unicart-summary .total-price {
    font-size: var(--wp--preset--font-size--large);
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .unicart-product {
        padding: var(--wp--preset--spacing--50);
    }
    
    .cart-variations {
        grid-template-columns: 1fr;
    }
    
    #carts-suckerfish .wrap,
    #unicart-summary .wrap {
        flex-direction: column;
        gap: var(--wp--preset--spacing--30);
    }
}

/* WooCommerce Integration */
.wc-block-mini-cart {
    position: relative;
    z-index: 1001;
}

/* Hide default WooCommerce messages when using our bulk cart */
.woocommerce-message {
    display: none;
}

.unicart-bulk-cart-active .woocommerce-message {
    display: block;
}

/* Uni-Carts Product Variations Block Integration */
.unicarts-product-variations-block .unicart-bulk-interface {
    /* Override plugin styles with theme design tokens */
    background: color-mix(in srgb, var(--wp--preset--color--base) 98%, var(--wp--preset--color--contrast));
    border-color: var(--wp--preset--color--unicart-red);
}

.unicarts-product-variations-block .unicart-add-button {
    background: transparent;
    color: var(--wp--preset--color--unicart-red);
    border: 2px solid var(--wp--preset--color--unicart-red);
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
    border-radius: 6px;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 600;
    transition: all 0.3s ease;
}

.unicarts-product-variations-block .unicart-add-button:hover {
    background: var(--wp--preset--color--unicart-red);
    color: var(--wp--preset--color--base);
}

.unicarts-product-variations-block .quantity-controls button {
    background: var(--wp--preset--color--base);
    border: 1px solid var(--wp--preset--color--unicart-red);
    color: var(--wp--preset--color--unicart-red);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.unicarts-product-variations-block .quantity-controls button:hover {
    background: var(--wp--preset--color--unicart-red);
    color: var(--wp--preset--color--base);
}

/* Custom animations using theme.json compatible approach */
@keyframes wobble {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(-5deg); }
    30% { transform: rotate(4deg); }
    45% { transform: rotate(-3deg); }
    60% { transform: rotate(2deg); }
    75% { transform: rotate(-1deg); }
    100% { transform: rotate(0deg); }
}

.wobble-for-attention {
    animation: wobble 1s ease-in-out;
}
