/*
 * WooCommerce Styles for KawaiiCharms Theme
 */

/* Product Loop/Archive */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    background: white;
    border-radius: 25px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    text-align: center;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.woocommerce ul.products li.product:nth-child(1) { animation-delay: 0.1s; }
.woocommerce ul.products li.product:nth-child(2) { animation-delay: 0.2s; }
.woocommerce ul.products li.product:nth-child(3) { animation-delay: 0.3s; }
.woocommerce ul.products li.product:nth-child(4) { animation-delay: 0.4s; }
.woocommerce ul.products li.product:nth-child(5) { animation-delay: 0.5s; }
.woocommerce ul.products li.product:nth-child(6) { animation-delay: 0.6s; }

.woocommerce ul.products li.product:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin: 0.5rem 0;
}

.woocommerce ul.products li.product .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-pink);
    margin: 0.5rem 0;
}

.woocommerce ul.products li.product .price del {
    color: #999;
    font-size: 1.2rem;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
}

/* Sale Badge */
.woocommerce span.onsale {
    background: var(--accent-yellow);
    color: var(--text-dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    min-height: 0;
    min-width: 0;
    line-height: 1.5;
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 9;
}

/* Add to Cart Button */
.woocommerce ul.products li.product .button {
    width: 100%;
    margin-top: 1rem;
    border-radius: 15px;
    padding: 0.9rem;
}

.woocommerce ul.products li.product .added_to_cart {
    display: block;
    margin-top: 0.5rem;
    background: var(--accent-blue);
    padding: 0.5rem;
    border-radius: 10px;
}

/* Product Categories */
.woocommerce ul.products li.product-category {
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-blue));
    color: white;
    position: relative;
    overflow: hidden;
}

.woocommerce ul.products li.product-category h2 {
    color: white;
    position: relative;
    z-index: 2;
}

.woocommerce ul.products li.product-category .count {
    background: rgba(255,255,255,0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* Single Product */
.woocommerce div.product {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s ease-out;
}

.woocommerce div.product .product_title {
    font-family: 'Baloo 2', cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.woocommerce div.product p.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-pink);
    margin-bottom: 1.5rem;
}

.woocommerce div.product .woocommerce-product-gallery {
    margin-bottom: 2rem;
}

.woocommerce div.product .woocommerce-product-gallery__image {
    border-radius: 20px;
    overflow: hidden;
}

.woocommerce div.product .woocommerce-product-gallery__trigger {
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product Tabs */
.woocommerce div.product .woocommerce-tabs {
    margin-top: 3rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1rem;
    border: none;
    margin: 0 0 2rem 0;
    background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    background: var(--primary-pink);
    border-radius: 15px;
    margin: 0;
    border: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background: var(--accent-purple);
    transform: translateY(-3px);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: white;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    display: block;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
    display: none;
}

.woocommerce div.product .woocommerce-tabs .panel {
    background: var(--bg-cream);
    padding: 2rem;
    border-radius: 20px;
    border: none;
    box-shadow: none;
}

/* Quantity Input */
.woocommerce div.product form.cart .quantity {
    display: inline-block;
    margin-right: 1rem;
}

.woocommerce .quantity input.qty {
    width: 80px;
    padding: 0.8rem;
    text-align: center;
    border: 2px solid var(--primary-pink);
    border-radius: 10px;
}

/* Related Products */
.woocommerce .related.products h2,
.woocommerce .upsells.products h2 {
    font-family: 'Baloo 2', cursive;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
}

/* Cart Page */
.woocommerce-cart .woocommerce {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
}

.woocommerce table.cart {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

.woocommerce table.cart thead {
    background: var(--primary-pink);
    color: white;
}

.woocommerce table.cart th {
    padding: 1rem;
    font-weight: 600;
    border: none;
}

.woocommerce table.cart td {
    padding: 1.5rem 1rem;
    border-top: 1px solid #f0f0f0;
    vertical-align: middle;
}

.woocommerce table.cart img {
    border-radius: 15px;
    width: 100px;
}

.woocommerce table.cart .product-name a {
    font-weight: 600;
    color: var(--text-dark);
}

.woocommerce table.cart .product-remove a {
    color: var(--secondary-pink) !important;
    font-size: 1.5rem;
}

.woocommerce .cart-collaterals {
    margin-top: 3rem;
}

.woocommerce .cart-collaterals .cart_totals {
    background: var(--bg-cream);
    padding: 2rem;
    border-radius: 20px;
}

.woocommerce .cart-collaterals .cart_totals h2 {
    font-family: 'Baloo 2', cursive;
    color: var(--text-dark);
}

.woocommerce .cart-collaterals .cart_totals table {
    border: none;
}

.woocommerce .cart-collaterals .cart_totals th,
.woocommerce .cart-collaterals .cart_totals td {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 1rem 0;
}

/* Checkout */
.woocommerce-checkout .woocommerce {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
}

.woocommerce form .form-row {
    margin-bottom: 1.5rem;
}

.woocommerce form .form-row label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select {
    width: 100%;
}

.woocommerce #order_review_heading {
    font-family: 'Baloo 2', cursive;
    color: var(--text-dark);
    margin-top: 2rem;
}

.woocommerce #order_review {
    background: var(--bg-cream);
    padding: 2rem;
    border-radius: 20px;
}

/* Messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 15px;
    border-left: 4px solid;
}

.woocommerce-message {
    background: #e8f5e9;
    border-left-color: #4caf50;
    color: #2e7d32;
}

.woocommerce-info {
    background: #e3f2fd;
    border-left-color: #2196f3;
    color: #1565c0;
}

.woocommerce-error {
    background: #ffebee;
    border-left-color: #f44336;
    color: #c62828;
}

.woocommerce-message a.button,
.woocommerce-info a.button {
    background: white;
    color: var(--text-dark);
    box-shadow: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Pagination */
.woocommerce nav.woocommerce-pagination {
    text-align: center;
    margin-top: 3rem;
}

.woocommerce nav.woocommerce-pagination ul {
    border: none;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none;
    display: inline-block;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    background: white;
    color: var(--text-dark);
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: block;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--accent-purple);
    color: white;
}

/* Widgets */
.woocommerce .widget {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.woocommerce .widget_shopping_cart_content {
    padding: 0;
}

.woocommerce .widget_price_filter .price_slider_wrapper {
    padding: 1rem 0;
}

.woocommerce .widget_price_filter .ui-slider {
    background: var(--bg-cream);
    border: none;
    border-radius: 10px;
    height: 8px;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-range {
    background: var(--accent-purple);
    border-radius: 10px;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-handle {
    background: var(--secondary-pink);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    top: -6px;
}

/* Star Rating */
.woocommerce .star-rating {
    color: var(--accent-yellow);
}

.woocommerce .star-rating::before {
    color: #ddd;
}

/* Reviews */
.woocommerce #reviews #comments ol.commentlist {
    list-style: none;
    padding: 0;
}

.woocommerce #reviews #comments ol.commentlist li {
    background: var(--bg-cream);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    border: none;
}

.woocommerce #reviews #comments ol.commentlist li .comment-text {
    border: none;
    padding: 0;
    margin: 0;
}

/* Account Pages */
.woocommerce-account .woocommerce {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
}

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

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin-bottom: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 1rem 1.5rem;
    background: var(--bg-cream);
    border-radius: 15px;
    color: var(--text-dark);
    font-weight: 600;
    transition: all 0.3s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--accent-purple);
    color: white;
    transform: translateX(5px);
}

/* Responsive WooCommerce */
@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
    
    .woocommerce div.product,
    .woocommerce-cart .woocommerce,
    .woocommerce-checkout .woocommerce,
    .woocommerce-account .woocommerce {
        padding: 1.5rem;
    }
    
    .woocommerce table.cart img {
        width: 60px;
    }
    
    .woocommerce table.cart td.product-remove,
    .woocommerce table.cart td.product-thumbnail {
        display: table-cell;
    }
}
