/* ==========================================================================
   Ektan — WooCommerce overrides
   ========================================================================== */

.ektan-wc-wrapper { max-width: 1280px; margin-inline: auto; padding-inline: 1.25rem; }

/* ── Shop layout ── */
.ektan-shop__layout.wp-block-columns {
    gap: 2rem !important;
    align-items: flex-start;
    flex-wrap: nowrap !important;
}

.ektan-shop__sidebar {
    position: sticky;
    top: 1.25rem;
    background: #fff;
    border: 1px solid var(--wp--preset--color--border, #e5e7eb);
    border-radius: 14px;
    padding: 1.25rem;
    flex-shrink: 0 !important;
}

/* Filter heading */
.ektan-filter-heading {
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin: 0 0 1rem !important;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--wp--preset--color--primary, #F59E0B);
    color: var(--wp--preset--color--text, #111);
}

/* Filter wrapper blocks */
.ektan-shop__sidebar .wp-block-woocommerce-filter-wrapper,
.ektan-shop__sidebar .wc-block-components-filter-wrapper {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--wp--preset--color--border, #e5e7eb);
}
.ektan-shop__sidebar .wp-block-woocommerce-filter-wrapper:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Filter titles */
.ektan-shop__sidebar .wc-block-components-filter-wrapper__title,
.ektan-shop__sidebar .wp-block-woocommerce-filter-wrapper h3 {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: var(--wp--preset--color--text, #111) !important;
    margin: 0 0 0.75rem !important;
}

/* Price slider */
.ektan-shop__sidebar .wc-block-price-filter__range-input-progress {
    background: var(--wp--preset--color--primary, #F59E0B) !important;
}
.ektan-shop__sidebar .wc-block-price-filter__range-input::-webkit-slider-thumb {
    background: var(--wp--preset--color--primary, #F59E0B) !important;
}

/* Checkbox filters */
.ektan-shop__sidebar .wc-block-components-checkbox__mark {
    border-color: var(--wp--preset--color--primary, #F59E0B) !important;
}
.ektan-shop__sidebar input[type="checkbox"]:checked + .wc-block-components-checkbox__mark {
    background: var(--wp--preset--color--primary, #F59E0B) !important;
}

/* Apply filter button */
.ektan-shop__sidebar .wc-block-components-filter-submit-button {
    background: var(--wp--preset--color--primary, #F59E0B) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 600 !important;
    width: 100%;
    cursor: pointer;
}

/* Toolbar */
.ektan-shop__toolbar {
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--wp--preset--color--border, #e5e7eb);
    padding-bottom: 0.85rem;
}
.ektan-shop__toolbar .wc-block-product-results-count { font-size: 0.88rem; color: #666; }
.ektan-shop__toolbar select { border-radius: 8px; border: 1px solid #ddd; padding: 0.4rem 0.75rem; font-size: 0.875rem; }

/* ── Product collection grid cards ── */
.ektan-product-collection .wc-block-product-template {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !important;
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

/* Each product li/div inside product-template */
.ektan-product-collection .wc-block-product-template > li,
.ektan-product-collection .wc-block-product-template > div {
    background: #fff;
    border: 1px solid var(--wp--preset--color--border, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.ektan-product-collection .wc-block-product-template > li:hover,
.ektan-product-collection .wc-block-product-template > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
    border-color: var(--wp--preset--color--primary, #F59E0B);
}

/* Product image */
.ektan-product-collection .wc-block-woocommerce-product-image-template-picker,
.ektan-product-collection .wc-block-product-image {
    aspect-ratio: 1 / 1;
    background: var(--wp--preset--color--surface, #f9fafb);
    overflow: hidden;
    display: block;
}
.ektan-product-collection .wc-block-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}
.ektan-product-collection .wc-block-product-template > li:hover .wc-block-product-image img,
.ektan-product-collection .wc-block-product-template > div:hover .wc-block-product-image img {
    transform: scale(1.05);
}

/* Card body */
.ektan-shop-card__body {
    padding: 0.7rem 0.85rem 0.4rem !important;
    flex: 1;
}

/* Product title */
.ektan-product-collection .wp-block-post-title {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
.ektan-product-collection .wp-block-post-title a {
    text-decoration: none;
    color: var(--wp--preset--color--text, #111);
}
.ektan-product-collection .wp-block-post-title a:hover {
    color: var(--wp--preset--color--primary, #F59E0B);
}

/* Price */
.ektan-product-collection .wc-block-components-product-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--wp--preset--color--primary-dark, #B45309);
}
.ektan-product-collection .wc-block-components-product-price__regular { color: #999; font-weight: 400; font-size: 0.82rem; text-decoration: line-through; }

/* Add to cart button */
.ektan-shop-card__btn .wc-block-components-product-button,
.ektan-product-collection .wc-block-components-product-button__button,
.ektan-shop-card__btn .wp-block-woocommerce-product-button a,
.ektan-shop-card__btn .wp-block-woocommerce-product-button button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: var(--wp--preset--color--primary, #F59E0B) !important;
    color: #fff !important;
    border: 0 !important;
    padding: 0.6rem 0.75rem !important;
    border-radius: 0 0 10px 10px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background .15s ease !important;
    white-space: nowrap;
    margin-top: auto;
}
.ektan-shop-card__btn .wp-block-woocommerce-product-button a:hover,
.ektan-shop-card__btn .wp-block-woocommerce-product-button button:hover,
.ektan-product-collection .wc-block-components-product-button__button:hover {
    background: var(--wp--preset--color--primary-dark, #B45309) !important;
    color: #fff !important;
}

/* Breadcrumb */
.ektan-breadcrumb { font-size: 0.85rem; margin-bottom: 1rem; color: #666; }
.ektan-breadcrumb a { color: var(--wp--preset--color--primary, #F59E0B); text-decoration: none; }

/* Pagination */
.ektan-product-collection .wp-block-query-pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
}
.ektan-product-collection .wp-block-query-pagination a,
.ektan-product-collection .wp-block-query-pagination-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    text-decoration: none;
    color: #333;
    transition: all .15s;
}
.ektan-product-collection .wp-block-query-pagination a:hover { border-color: var(--wp--preset--color--primary, #F59E0B); color: var(--wp--preset--color--primary, #F59E0B); }
.ektan-product-collection .wp-block-query-pagination-numbers .current { background: var(--wp--preset--color--primary, #F59E0B); color: #fff; border-color: var(--wp--preset--color--primary, #F59E0B); }

/* Responsive */
@media (max-width: 900px) {
    .ektan-shop__layout.wp-block-columns { flex-wrap: wrap !important; }
    .ektan-shop__sidebar { position: static; width: 100% !important; flex-basis: 100% !important; }
    .ektan-product-collection .wc-block-product-template { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
    .ektan-product-collection .wc-block-product-template { grid-template-columns: repeat(1, 1fr) !important; }
}

/* Product loop cards */
.ektan-shop__results .wc-block-product-image,
ul.products li.product img {
    border-radius: 10px;
}

ul.products {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

ul.products li.product {
    background: #fff;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 14px;
    padding: 0.75rem;
    transition: transform .15s ease, box-shadow .15s ease;
}
ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

ul.products li.product .price {
    color: var(--wp--preset--color--primary-dark);
    font-weight: 700;
}

ul.products li.product .button,
.ektan-product-card__add {
    background: var(--wp--preset--color--primary);
    color: #fff;
    border: 0;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}
ul.products li.product .button:hover {
    background: var(--wp--preset--color--primary-dark);
    color: #fff;
}

/* ── Shared ektan-product-card component ──────────────────────────────────
   Defined here so every block (flash-sale, feature-grid, category-showcase)
   gets card styles regardless of whether product-slider is on the same page. */
.ektan-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--ektan-card-bg, #fff);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--ektan-card-radius, 14px);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.ektan-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0,0,0,.08);
    border-color: var(--wp--preset--color--primary);
}
.ektan-product-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.ektan-product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--wp--preset--color--surface);
    overflow: hidden;
}
.ektan-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.ektan-product-card:hover .ektan-product-card__media img {
    transform: scale(1.04);
}
.ektan-product-card__badge {
    position: absolute;
    top: .65rem;
    left: .65rem;
    background: var(--wp--preset--color--danger);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .55rem;
    border-radius: 999px;
    letter-spacing: .03em;
}
.ektan-product-card__body {
    padding: .85rem .9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.ektan-product-card__title {
    font-size: var(--ektan-title-size, .95rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--wp--preset--color--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
.ektan-product-card__price {
    font-weight: 700;
    color: var(--ektan-price-color, var(--wp--preset--color--primary-dark));
    font-size: var(--ektan-price-size, 1rem);
}
.ektan-product-card__price del {
    color: var(--wp--preset--color--text-soft);
    font-weight: 400;
    margin-right: .35rem;
}
.ektan-product-card__price ins { text-decoration: none; }

.ektan-product-card__add,
.ektan-product-card .button.ektan-product-card__add {
    display: block;
    margin: 0 .9rem 1rem;
    text-align: center;
    background: var(--ektan-btn-bg, var(--wp--preset--color--primary));
    color: var(--ektan-btn-color, #fff);
    padding: var(--ektan-btn-pv, .55rem) var(--ektan-btn-ph, .75rem);
    border-radius: var(--ektan-btn-radius, 8px);
    font-size: var(--ektan-btn-font-size, .85rem);
    font-weight: 600;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: background .15s ease;
}
.ektan-product-card__add:hover,
.ektan-product-card .button.ektan-product-card__add:hover {
    background: var(--ektan-btn-bg-hover, var(--wp--preset--color--primary-dark));
    color: var(--ektan-btn-color, #fff);
}

@media (max-width: 1024px) { ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  {
    ul.products { grid-template-columns: repeat(2, 1fr); }
    .ektan-shop__columns { flex-direction: column; }
    .ektan-shop__sidebar { width: 100%; }
}

/* Sale flash */
.ektan-sale-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--wp--preset--color--danger);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    z-index: 2;
}
ul.products li.product { position: relative; }

/* Single product */
.ektan-product__columns { gap: 2rem; align-items: flex-start; }
.ektan-product__summary .price {
    font-size: 1.75rem;
    color: var(--wp--preset--color--primary-dark);
    font-weight: 700;
}

.ektan-product__summary .quantity input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 8px;
}

.ektan-product__summary .single_add_to_cart_button {
    background: var(--wp--preset--color--primary);
    color: #fff;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    border: 0;
    font-weight: 700;
    cursor: pointer;
    margin-left: 0.5rem;
}
.ektan-product__summary .single_add_to_cart_button:hover {
    background: var(--wp--preset--color--primary-dark);
}

.woocommerce-tabs ul.tabs {
    border-bottom: 1px solid var(--wp--preset--color--border);
    padding: 0;
    margin: 0 0 1.25rem;
    list-style: none;
    display: flex;
    gap: 0.5rem;
}
.woocommerce-tabs ul.tabs li {
    padding: 0.6rem 1rem;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
}
.woocommerce-tabs ul.tabs li.active {
    background: var(--wp--preset--color--surface);
    font-weight: 700;
}

/* Cart & checkout */
.ektan-cart table.shop_table,
.ektan-checkout table.shop_table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 12px;
    overflow: hidden;
}
.ektan-cart table.shop_table th,
.ektan-checkout table.shop_table th {
    background: var(--wp--preset--color--surface);
    text-align: left;
    padding: 0.85rem;
}
.ektan-cart table.shop_table td,
.ektan-checkout table.shop_table td {
    padding: 0.85rem;
    border-top: 1px solid var(--wp--preset--color--border);
}

.cart_totals,
.woocommerce-checkout-review-order {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.button.checkout-button,
#place_order {
    background: var(--wp--preset--color--primary);
    color: #fff;
    width: 100%;
    text-align: center;
    padding: 0.95rem;
    border-radius: 10px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
}
.button.checkout-button:hover,
#place_order:hover { background: var(--wp--preset--color--primary-dark); }

/* My account navigation */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--wp--preset--color--text);
}
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--primary);
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin: 0 0 1rem;
}
.woocommerce-message { background: #FFFBEB; border-left: 4px solid var(--wp--preset--color--primary); }
.woocommerce-info    { background: #fff8e1; border-left: 4px solid #DC2626; }
.woocommerce-error   { background: #fde7e7; border-left: 4px solid var(--wp--preset--color--danger); }
