/* ========================================
   WooCommerce Overrides – Art4Fun Theme
   ======================================== */

/* ---- Product Grid ---- */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    list-style: none;
    margin: 0 !important;
    padding: 0;
}

@media (max-width: 1024px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .woocommerce ul.products { grid-template-columns: 1fr; }
}

/* ---- Product Cards ---- */
.woocommerce ul.products li.product {
    background: #ffffff;
    border-radius: 32px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
    clear: none !important;
    display: flex;
    flex-direction: column;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

/* ---- Product Image ---- */
.woocommerce ul.products li.product a img {
    margin: 0 !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.7s ease;
}

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

/* ---- Product Title ---- */
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1e1b18;
    padding: 0 !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3;
}

.woocommerce ul.products li.product h2 a {
    color: inherit;
    text-decoration: none;
}

.woocommerce ul.products li.product h2 a:hover {
    color: #685296;
}

/* ---- Price ---- */
.woocommerce ul.products li.product .price {
    color: #685296;
    font-size: 15px;
    font-weight: 700;
    margin: 0 !important;
    padding: 0 !important;
}

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

.woocommerce ul.products li.product .price del {
    opacity: 0.5;
    font-size: 13px;
    margin-right: 4px;
}

/* ---- Add to Cart Button ---- */
.woocommerce ul.products li.product .button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #7B61FF;
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.2);
    transition: all 0.3s ease;
    margin-top: 0;
    width: 100%;
    text-decoration: none;
    border: none;
    line-height: 1;
}

.woocommerce ul.products li.product .button:hover {
    background: #685296;
    box-shadow: 0 6px 16px rgba(123, 97, 255, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

.woocommerce ul.products li.product .added_to_cart {
    display: none;
}

.woocommerce ul.products li.product .button.loading {
    opacity: 0.7;
}

.woocommerce ul.products li.product .button.added {
    background: #2e7d32;
    box-shadow: none;
}

/* ---- Sale Badge ---- */
.woocommerce span.onsale {
    background: #ba1a1a;
    color: #fff;
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    min-height: auto;
    min-width: auto;
    line-height: 1.2;
    top: 12px;
    left: 12px;
    margin: 0;
    position: absolute;
    z-index: 10;
}

/* ---- Star Rating ---- */
.woocommerce .star-rating {
    color: #685296;
    font-size: 14px;
}

/* ---- Single Product ---- */
.woocommerce div.product {
    margin-top: 24px;
}

.woocommerce div.product .product_title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1e1b18;
}

.woocommerce div.product p.price {
    color: #7B61FF;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.woocommerce div.product p.price del {
    opacity: 0.5;
    font-size: 20px;
}

.woocommerce div.product p.price ins {
    text-decoration: none;
}

.woocommerce div.product .single_add_to_cart_button {
    background: #7B61FF !important;
    color: #ffffff;
    border-radius: 9999px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
    width: auto;
}

.woocommerce div.product .single_add_to_cart_button:hover {
    background: #685296 !important;
    box-shadow: 0 8px 24px rgba(123, 97, 255, 0.35);
    transform: translateY(-2px);
    color: #fff;
}

.woocommerce div.product .woocommerce-product-gallery {
    border-radius: 32px;
    overflow: hidden;
}

.woocommerce div.product .woocommerce-tabs {
    background: #ffffff;
    border-radius: 32px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    padding: 0 0 16px 0 !important;
    margin: 0 0 16px 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border: none;
    background: transparent;
    border-radius: 9999px;
    padding: 0;
    margin: 0 8px 0 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 9999px;
    background: #f5ece7;
    color: #1e1b18;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    background: #685296;
    color: #fff;
}

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

/* ---- Related Products ---- */
.woocommerce .related ul.products li.product,
.woocommerce .upsells ul.products li.product {
    width: 100% !important;
}

/* ---- Quantity Input ---- */
.woocommerce .quantity .qty {
    border-radius: 9999px;
    border: 1px solid #cec5bc;
    padding: 8px 12px;
    width: 60px;
    text-align: center;
}

/* ---- Cart ---- */
.woocommerce-cart .cart-collaterals .cart_totals {
    background: #ffffff;
    border-radius: 32px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.woocommerce table.shop_table {
    border-radius: 32px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.woocommerce table.shop_table th {
    background: #f5ece7;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: #1e1b18;
    padding: 12px 16px;
}

.woocommerce table.shop_table td {
    padding: 12px 16px;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button {
    background: #7B61FF;
    border-radius: 9999px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
    background: #685296;
}

/* ---- Checkout ---- */
.woocommerce-checkout #payment {
    background: #ffffff;
    border-radius: 32px;
    overflow: hidden;
    border: none;
}

.woocommerce-checkout #payment div.payment_box {
    background: #f5ece7;
    border-radius: 16px;
}

.woocommerce-checkout #payment ul.payment_methods {
    padding: 16px;
}

.woocommerce-checkout #payment div.form-row {
    padding: 16px;
}

.woocommerce .select2-container .select2-selection--single {
    border-radius: 9999px;
    border: none;
    background: #fff8f5;
    padding: 8px 16px;
    height: auto;
}

.woocommerce form .form-row input,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    border-radius: 9999px;
    border: none;
    background: #fff8f5;
    padding: 12px 20px;
    width: 100%;
    color: #1e1b18;
}

.woocommerce form .form-row textarea {
    border-radius: 24px;
    min-height: 100px;
}

.woocommerce form .form-row label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

/* ---- Buttons ---- */
.woocommerce button.button.alt {
    background: #7B61FF !important;
    border-radius: 9999px;
    padding: 12px 28px;
    font-weight: 600;
    color: #fff !important;
}

.woocommerce button.button.alt:hover {
    background: #685296 !important;
    opacity: 1;
}

.woocommerce button.button {
    border-radius: 9999px;
    padding: 10px 24px;
    font-weight: 600;
}

/* ---- Cart Remove Button ---- */
.woocommerce a.remove {
    color: #ba1a1a !important;
    background: #ffdad6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}

.woocommerce a.remove:hover {
    background: #ba1a1a;
    color: #fff !important;
}

/* ---- Messages & Notices ---- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: 16px;
    padding: 16px 24px !important;
    margin-bottom: 16px !important;
    border: none;
    background: #f5ece7;
    color: #1e1b18;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    display: none;
}

.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
    background: #7B61FF;
    border-radius: 9999px;
    padding: 8px 20px;
    font-size: 13px;
    color: #fff;
}

.woocommerce-message {
    border-top: 3px solid #2e7d32;
}

.woocommerce-error {
    border-top: 3px solid #ba1a1a;
}

.woocommerce-info {
    border-top: 3px solid #685296;
}

/* ---- Coupon ---- */
.woocommerce-cart .coupon input.input-text {
    border-radius: 9999px;
    border: none;
    background: #fff8f5;
    padding: 10px 16px;
    width: auto;
}

/* ---- Pagination ---- */
.woocommerce nav.woocommerce-pagination {
    margin-top: 24px;
}

.woocommerce nav.woocommerce-pagination ul {
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none;
    margin: 0 4px;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    border-radius: 9999px;
    padding: 8px 16px;
    font-weight: 600;
    background: #f5ece7;
    color: #1e1b18;
    min-width: 40px;
    text-align: center;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #685296;
    color: #fff;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: #e9e1dc;
}
