/* WooCommerce Theme Overrides — JatiJepara Furniture */

:root {
    --wc-primary: var(--jj-primary);
    --wc-accent: var(--jj-accent);
}

/* ── Global WooCommerce Resets & Elements ────────────────────────────────── */
.woocommerce-store-notice { background-color: var(--jj-primary); color: #fff; padding: 10px 0; font-size: 0.875rem; text-align: center; }
.woocommerce-store-notice__dismiss-link { color: var(--jj-accent); margin-left: 10px; font-weight: bold; }

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
    border-top: 3px solid var(--jj-primary);
    background-color: var(--jj-light);
    color: var(--jj-dark);
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.woocommerce .woocommerce-message { border-top-color: #10b981; }
.woocommerce .woocommerce-error { border-top-color: #ef4444; list-style: none; display: block; }

.woocommerce .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--jj-primary);
    color: #fff;
}
.woocommerce .button:hover { background-color: var(--jj-dark); color: #fff; }
.woocommerce .button.alt { background-color: var(--jj-accent); color: #fff; }
.woocommerce .button.alt:hover { background-color: #d97706; }

/* ── 1. Halaman Shop & Archive ───────────────────────────────────────────── */
.shop-main { padding: 4rem 0; }
.shop-container { display: flex; flex-direction: column; gap: 3rem; }
@media (min-width: 1024px) {
    .shop-container { flex-direction: row; }
}

/* Sidebar widget styling */
.shop-sidebar { width: 100%; }
@media (min-width: 1024px) {
    .shop-sidebar { width: 25%; flex-shrink: 0; }
}

.shop-sidebar .widget { background: #fff; padding: 1.5rem; border-radius: 0.5rem; border: 1px solid #f1f5f9; margin-bottom: 2rem; }
.shop-sidebar .widget-title { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 1.25rem; position: relative; padding-bottom: 0.5rem; border-bottom: 1px solid #e2e8f0; }
.shop-sidebar .widget-title::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 40px; height: 2px; background: var(--jj-accent); }

/* List widgets */
.shop-sidebar ul { list-style: none; padding: 0; margin: 0; }
.shop-sidebar li { padding: 0.5rem 0; border-bottom: 1px solid #f8fafc; font-size: 0.9375rem; display: flex; justify-content: space-between; align-items: center; }
.shop-sidebar li:last-child { border-bottom: none; }
.shop-sidebar li a { color: #475569; transition: color 0.3s; }
.shop-sidebar li a:hover { color: var(--jj-accent); }
.shop-sidebar li .count { background: #f1f5f9; padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.75rem; color: #64748b; }

/* Active Filters Widget */
.woocommerce-widget-layered-nav-list__item--chosen a { color: var(--jj-accent) !important; font-weight: bold; }
.woocommerce-widget-layered-nav-list__item--chosen::after { content: '×'; margin-left: 5px; color: #ef4444; }

/* Filter Harga Widget */
.woocommerce .widget_price_filter .ui-slider { background: #e2e8f0; height: 6px; border-radius: 9999px; margin-bottom: 1.5rem; position: relative; }
.woocommerce .widget_price_filter .ui-slider .ui-slider-range { background: var(--jj-accent); position: absolute; height: 100%; border-radius: 9999px; }
.woocommerce .widget_price_filter .ui-slider .ui-slider-handle { width: 16px; height: 16px; border-radius: 50%; background: var(--jj-primary); border: 2px solid #fff; position: absolute; top: -5px; cursor: pointer; outline: none; margin-left: -8px; }
.woocommerce .widget_price_filter .price_slider_amount { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; }
.woocommerce .widget_price_filter .price_slider_amount .button { padding: 0.4rem 1rem; font-size: 0.75rem; }

/* Area Konten Shop */
.shop-content-area { width: 100%; }
@media (min-width: 1024px) {
    .shop-content-area { width: 75%; }
    .shop-content-area.no-sidebar { width: 100%; }
}

.shop-ordering-bar { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) {
    .shop-ordering-bar { flex-direction: row; align-items: center; }
}

.woocommerce-result-count { font-size: 0.9375rem; color: #64748b; margin: 0; }
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select { padding: 0.5rem 2rem 0.5rem 1rem; border-radius: 0.375rem; border: 1px solid #cbd5e1; background: #fff; font-size: 0.875rem; color: #334155; outline: none; cursor: pointer; }

/* WooCommerce Grid Reset */
.woocommerce ul.products { display: grid; grid-template-columns: 1fr; gap: 2rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
    .shop-content-area.no-sidebar ul.products { grid-template-columns: repeat(4, 1fr); }
}

/* Pagination */
.shop-pagination-bar { margin-top: 3rem; display: flex; justify-content: center; }
.woocommerce nav.woocommerce-pagination { border: none; }
.woocommerce nav.woocommerce-pagination ul { border: none; display: flex; gap: 0.5rem; padding: 0; margin: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: none; display: inline-block; margin: 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 0.375rem; border: 1px solid #cbd5e1; background: #fff; color: var(--jj-dark); text-decoration: none; font-weight: 600; transition: all 0.3s ease; }
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--jj-primary); color: #fff; border-color: var(--jj-primary); }

/* ── 2. Halaman Detail Produk (Single Product) ────────────────────────────── */
.shop-single-main { padding: 4rem 0; }
.shop-single-container { background: #fff; padding: 2.5rem; border-radius: 0.75rem; border: 1px solid #f1f5f9; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }

.woocommerce div.product { display: flex; flex-direction: column; gap: 3rem; }
@media (min-width: 768px) {
    .woocommerce div.product { flex-direction: row; }
}

/* Gallery single product */
.woocommerce div.product .woocommerce-product-gallery { width: 100%; position: relative; }
@media (min-width: 768px) {
    .woocommerce div.product .woocommerce-product-gallery { width: 50%; }
}
.woocommerce-product-gallery__image img { width: 100%; border-radius: 0.5rem; object-fit: cover; }
.woocommerce-product-gallery .flex-control-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 1rem; list-style: none; padding: 0; }
.woocommerce-product-gallery .flex-control-thumbs li { cursor: pointer; }
.woocommerce-product-gallery .flex-control-thumbs img { border-radius: 0.25rem; opacity: 0.6; transition: opacity 0.3s; width: 100%; height: auto; border: 2px solid transparent; }
.woocommerce-product-gallery .flex-control-thumbs img:hover,
.woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--jj-accent); }

/* Entry Summary */
.woocommerce div.product .summary { width: 100%; display: flex; flex-direction: column; }
@media (min-width: 768px) {
    .woocommerce div.product .summary { width: 50%; }
}

.woocommerce div.product .product_title { font-family: 'Playfair Display', serif; font-size: 2.25rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 0.75rem; line-height: 1.2; }
.woocommerce div.product .woocommerce-product-rating { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.woocommerce div.product .woocommerce-product-rating .star-rating { color: var(--jj-accent); }
.woocommerce div.product .woocommerce-review-link { font-size: 0.875rem; color: #64748b; text-decoration: none; }
.woocommerce div.product .woocommerce-review-link:hover { color: var(--jj-accent); }

/* Harga */
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--jj-accent); font-size: 1.75rem; font-weight: 700; margin-bottom: 1.5rem; display: flex; align-items: baseline; gap: 0.5rem; }
.woocommerce div.product p.price del,
.woocommerce div.product span.price del { color: #94a3b8; font-size: 1.125rem; font-weight: normal; }
.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins { text-decoration: none; }

/* Deskripsi singkat */
.woocommerce-product-details__short-description { font-size: 1rem; color: #475569; line-height: 1.6; margin-bottom: 2rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 1.5rem; }

/* Quantity and Add to Cart */
.woocommerce div.product form.cart { display: flex; gap: 1rem; align-items: center; margin-bottom: 2.5rem; flex-wrap: wrap; }
.woocommerce div.product form.cart .quantity { margin: 0; display: inline-flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 0.375rem; overflow: hidden; background: #f8fafc; }
.woocommerce div.product form.cart .quantity input.qty { width: 3.5rem; height: 2.75rem; text-align: center; border: none; background: transparent; font-size: 1rem; font-weight: 600; color: var(--jj-dark); outline: none; }

.woocommerce div.product form.cart .button { height: 2.75rem; padding: 0 2rem; font-size: 1rem; }

/* Meta */
.product_meta { font-size: 0.875rem; color: #64748b; display: flex; flex-direction: column; gap: 0.5rem; border-top: 1px solid #f1f5f9; padding-top: 1.5rem; }
.product_meta span strong,
.product_meta span a { color: var(--jj-dark); text-decoration: none; }
.product_meta span a:hover { color: var(--jj-accent); }

/* Tabs (Deskripsi, Informasi Tambahan, Reviews) */
.woocommerce-tabs { margin-top: 4rem; border-top: 1px solid #e2e8f0; padding-top: 2rem; }
.woocommerce-tabs ul.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid #e2e8f0; list-style: none; padding: 0 0 1px 0; margin: 0 0 2rem 0; }
.woocommerce-tabs ul.tabs li { padding: 0.75rem 0.5rem; font-weight: 600; color: #64748b; cursor: pointer; position: relative; border: none; background: transparent; }
.woocommerce-tabs ul.tabs li.active { color: var(--jj-primary); }
.woocommerce-tabs ul.tabs li.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px; background: var(--jj-accent); }
.woocommerce-tabs ul.tabs li a { color: inherit; text-decoration: none; }

.woocommerce-Tabs-panel { line-clamp: initial; font-size: 0.9375rem; color: #475569; line-height: 1.6; }
.woocommerce-Tabs-panel h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 1rem; }

/* Reviews List */
#comments h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--jj-primary); margin-bottom: 1.5rem; }
.commentlist { list-style: none; padding: 0; margin: 0 0 2rem 0; }
.commentlist li { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #f1f5f9; }
.commentlist li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.commentlist .comment_container { display: flex; gap: 1rem; }
.commentlist .avatar { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; }
.commentlist .comment-text { flex-grow: 1; }
.commentlist .star-rating { color: var(--jj-accent); float: right; margin-bottom: 0.5rem; }
.commentlist .meta { font-size: 0.875rem; color: #64748b; margin-bottom: 0.75rem; }
.commentlist .meta strong { color: var(--jj-dark); }
.commentlist .description { font-size: 0.9375rem; color: #475569; line-height: 1.5; }

/* Review Form */
#review_form_wrapper { background: var(--jj-light); padding: 2rem; border-radius: 0.5rem; border: 1px solid #e2e8f0; margin-top: 2rem; }
#review_form .comment-reply-title { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 1rem; display: block; }
#review_form .comment-form-rating { margin-bottom: 1.5rem; }
#review_form .comment-form-rating label { font-weight: 600; display: block; margin-bottom: 0.5rem; }
#review_form .stars { font-size: 1.25rem; color: var(--jj-accent); }
#review_form .comment-form-comment label,
#review_form .comment-form-author label,
#review_form .comment-form-email label { font-weight: 600; display: block; margin-bottom: 0.5rem; }
#review_form textarea,
#review_form input[type="text"],
#review_form input[type="email"] { width: 100%; padding: 0.75rem; border-radius: 0.375rem; border: 1px solid #cbd5e1; outline: none; background: #fff; margin-bottom: 1.25rem; }
#review_form textarea { height: 8rem; resize: vertical; }
#review_form .form-submit { margin: 0; }

/* Related Products */
.related.products { margin-top: 4rem; border-top: 1px solid #e2e8f0; padding-top: 3rem; }
.related.products h2 { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 2rem; }

/* ── 3. Halaman Keranjang Belanja (Cart) ────────────────────────────────── */
.woocommerce-cart-form { width: 100%; margin-bottom: 3rem; overflow-x: auto; }
.shop_table { width: 100%; border-collapse: collapse; text-align: left; }
.shop_table th { background: #f8fafc; padding: 1rem; font-weight: 700; color: var(--jj-primary); border-bottom: 2px solid #e2e8f0; }
.shop_table td { padding: 1.5rem 1rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }

.cart_item .product-remove a { color: #ef4444; font-size: 1.25rem; text-decoration: none; }
.cart_item .product-thumbnail img { width: 80px; height: 80px; object-fit: cover; border-radius: 0.25rem; }
.cart_item .product-name a { color: var(--jj-primary); font-weight: 600; text-decoration: none; }
.cart_item .product-name a:hover { color: var(--jj-accent); }
.cart_item .product-price,
.cart_item .product-subtotal { font-weight: 600; }
.cart_item .quantity { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 0.25rem; overflow: hidden; }
.cart_item .quantity input.qty { width: 3rem; height: 2.25rem; text-align: center; border: none; font-weight: bold; background: #fff; }

.woocommerce-cart-form .actions { padding: 1.5rem 1rem; background: #f8fafc; }
.woocommerce-cart-form .coupon { display: inline-flex; gap: 0.5rem; margin-bottom: 1rem; }
@media (min-width: 640px) {
    .woocommerce-cart-form .coupon { margin-bottom: 0; }
}
.woocommerce-cart-form .coupon input[type="text"] { padding: 0.5rem 1rem; border-radius: 0.25rem; border: 1px solid #cbd5e1; outline: none; width: 12rem; }

/* Cart Collaterals / Totals */
.cart-collaterals { display: flex; justify-content: flex-end; margin-top: 2rem; }
.cart_totals { width: 100%; }
@media (min-width: 768px) {
    .cart_totals { width: 400px; }
}
.cart_totals h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 1.5rem; }
.cart_totals table { width: 100%; margin-bottom: 1.5rem; }
.cart_totals th { background: transparent; border-bottom: 1px solid #e2e8f0; width: 35%; padding: 0.75rem 0; }
.cart_totals td { border-bottom: 1px solid #e2e8f0; padding: 0.75rem 0; text-align: right; }
.cart_totals .order-total td { font-size: 1.25rem; color: var(--jj-accent); font-weight: bold; }
.checkout-button { width: 100%; padding: 1rem; font-size: 1.125rem; }

/* ── 4. Halaman Checkout ────────────────────────────────────────────────── */
.woocommerce-checkout { display: flex; flex-direction: column; gap: 3rem; margin-top: 2rem; }
@media (min-width: 1024px) {
    .woocommerce-checkout { flex-direction: row; }
}

.woocommerce-checkout #customer_details { width: 100%; }
@media (min-width: 1024px) {
    .woocommerce-checkout #customer_details { width: 60%; }
}
.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 { width: 100%; margin-bottom: 2rem; }
.woocommerce-checkout h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 1.5rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.5rem; }

.woocommerce-checkout #order_review_heading { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 1.5rem; }
.woocommerce-checkout #order_review { width: 100%; background: #fff; padding: 2rem; border-radius: 0.5rem; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
@media (min-width: 1024px) {
    .woocommerce-checkout #order_review { width: 40%; align-self: flex-start; }
}

.woocommerce-checkout .form-row { display: flex; flex-direction: column; margin-bottom: 1.25rem; width: 100%; }
.woocommerce-checkout .form-row label { font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9375rem; }
.woocommerce-checkout .form-row input[type="text"],
.woocommerce-checkout .form-row input[type="tel"],
.woocommerce-checkout .form-row input[type="email"],
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea { padding: 0.75rem; border: 1px solid #cbd5e1; border-radius: 0.25rem; width: 100%; outline: none; background: #fff; }
.woocommerce-checkout .form-row textarea { height: 6rem; }

.woocommerce-checkout .select2-container--default .select2-selection--single { height: 2.75rem; border: 1px solid #cbd5e1; border-radius: 0.25rem; }

/* Payment methods checkout */
#payment { background: #f8fafc; padding: 1.5rem; border-radius: 0.375rem; margin-top: 1.5rem; }
#payment ul.payment_methods { list-style: none; padding: 0; margin: 0 0 1.5rem 0; }
#payment ul.payment_methods li { margin-bottom: 1rem; }
#payment ul.payment_methods li label { font-weight: 700; cursor: pointer; }
#payment div.payment_box { background: #fff; padding: 1rem; border-radius: 0.25rem; border: 1px solid #e2e8f0; margin-top: 0.5rem; font-size: 0.875rem; color: #475569; }

#place_order { width: 100%; padding: 1rem; font-size: 1.125rem; margin-top: 1rem; }

/* ── 5. Halaman Akun Saya (My Account) ──────────────────────────────────── */
.woocommerce-MyAccount-navigation { list-style: none; padding: 0; margin: 0 0 2rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 1rem; }
.woocommerce-MyAccount-navigation-link { margin: 0; }
.woocommerce-MyAccount-navigation-link a { display: inline-block; padding: 0.5rem 1rem; border-radius: 0.25rem; background: #f1f5f9; color: var(--jj-primary); text-decoration: none; font-weight: 600; font-size: 0.875rem; transition: all 0.3s; }
.woocommerce-MyAccount-navigation-link.is-active a,
.woocommerce-MyAccount-navigation-link a:hover { background: var(--jj-primary); color: #fff; }

.woocommerce-MyAccount-content { font-size: 0.9375rem; color: #475569; line-height: 1.6; }
.woocommerce-MyAccount-content h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--jj-primary); margin-bottom: 1rem; }
.woocommerce-MyAccount-content p { margin-bottom: 1rem; }
.woocommerce-MyAccount-content .woocommerce-Addresses { display: flex; flex-direction: column; gap: 2rem; margin-top: 2rem; }
@media (min-width: 640px) {
    .woocommerce-MyAccount-content .woocommerce-Addresses { flex-direction: row; }
}
.woocommerce-MyAccount-content .woocommerce-Address { width: 100%; background: #f8fafc; padding: 1.5rem; border-radius: 0.375rem; border: 1px solid #e2e8f0; }
.woocommerce-MyAccount-content .woocommerce-Address-title { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #cbd5e1; padding-bottom: 0.5rem; margin-bottom: 1rem; }
.woocommerce-MyAccount-content .woocommerce-Address-title h3 { margin: 0; font-size: 1.125rem; }
.woocommerce-MyAccount-content .edit { font-size: 0.875rem; color: var(--jj-accent); text-decoration: none; }
