/* ==================== BShop Product Cards (WooCommerce Style) ==================== */

.products.grid {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==================== Featured Product (only-product) ==================== */

.bs-featured-card {
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-white, #ffffff);
    transition: box-shadow 0.3s ease;
}

.bs-featured-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.bs-featured-top {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.bs-featured-img {
    flex: 0 0 40%;
    max-width: 40%;
    overflow: hidden;
    background-color: var(--color-gray-100, #f9fafb);
}

.bs-featured-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.bs-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bs-featured-card:hover .bs-featured-img img {
    transform: scale(1.05);
}

.bs-featured-details {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bs-featured-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
}

.bs-featured-title a {
    color: var(--color-text, #1f2937);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bs-featured-title a:hover {
    color: var(--color-primary-500, #590808);
}

.bs-featured-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.bs-featured-price .bs-price-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary-500, #590808);
    direction: ltr;
}

.bs-featured-price .bs-price-currency {
    font-size: 13px;
    color: var(--color-gray-500, #6b7280);
    font-weight: 400;
}

.bs-featured-short {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-gray-600, #4b5563);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-featured-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background-color: var(--color-primary-500, #590808);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
    margin-top: auto;
    align-self: flex-start;
}

.bs-featured-buy:hover {
    opacity: 0.9;
    box-shadow: 0 4px 16px rgba(89, 8, 8, 0.3);
}

.bs-featured-buy svg {
    flex-shrink: 0;
}

.bs-featured-desc {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border, #e5e7eb);
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-gray-600, #4b5563);
}

.bs-featured-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.bs-product-card {
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-white, #ffffff);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bs-product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.bs-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.bs-product-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--color-gray-100, #f9fafb);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bs-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bs-product-card:hover .bs-product-img img {
    transform: scale(1.08);
}

/* WooCommerce-style hover action buttons */
.bs-product-actions {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.bs-product-card:hover .bs-product-actions {
    transform: translateY(0);
}

.bs-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white, #ffffff);
    border-radius: 50%;
    color: var(--color-text, #1f2937);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bs-action-btn:hover {
    background-color: var(--color-primary-500, #590808);
    color: #ffffff;
}

.bs-action-btn svg {
    flex-shrink: 0;
}

/* Product Info */
.bs-product-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.bs-product-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.bs-product-title a {
    color: var(--color-text, #1f2937);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bs-product-title a:hover {
    color: var(--color-primary-500, #590808);
}

/* Price */
.bs-product-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: auto;
    padding-top: 4px;
}

.bs-price-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary-500, #590808);
    direction: ltr;
}

.bs-price-currency {
    font-size: 12px;
    color: var(--color-gray-500, #6b7280);
    font-weight: 400;
}

/* ==================== Basket / Checkout Steps ==================== */

#bs {
    width: 100%;
}

#bs .tpost {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

#bs .tpost h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

#bs .xpost {
    padding: 0;
}

#bs .xpost > div {
    padding: 16px !important;
}

#bs .p3 {
    display: none;
}

/* ==================== Step Indicator ==================== */

.mm-special-page {
    max-width: 100%;
}

.mm-step {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding: 0 8px;
    position: relative;
}

.mm-step::before {
    content: '';
    position: absolute;
    top: 18px;
    right: 40px;
    left: 40px;
    height: 2px;
    background-color: var(--color-gray-200, #e5e7eb);
    z-index: 0;
}

.mm-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
}

.mm-steps .num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-gray-200, #e5e7eb);
    color: var(--color-gray-700, #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mm-steps .num::before {
    font-size: 14px;
    font-weight: 700;
}

.mm-steps.num1 .num::before,
.mm-steps .num1::before { content: '1'; }
.mm-steps.num2 .num::before,
.mm-steps .num2::before { content: '2'; }
.mm-steps.num3 .num::before,
.mm-steps .num3::before { content: '3'; }
.mm-steps.num4 .num::before,
.mm-steps .num4::before { content: '4'; }

.mm-steps .mm-step-label {
    font-size: 12px;
    color: var(--color-gray-500, #6b7280);
    text-align: center;
    line-height: 1.4;
    max-width: 100px;
}

.mm-steps .mm-step-label a {
    color: var(--color-gray-500, #6b7280) !important;
    text-decoration: none;
    font-weight: 500;
}

.mm-steps .mm-step-label a:hover {
    color: var(--color-primary-500, #590808) !important;
}

.mm-step-select .num {
    background-color: var(--color-primary-500, #590808);
    color: #ffffff;
    border-color: var(--color-primary-500, #590808);
    box-shadow: 0 0 0 4px rgba(89, 8, 8, 0.15);
}

.mm-step-select .mm-step-label {
    color: var(--color-primary-500, #590808);
    font-weight: 600;
}

.mm-step-select .mm-step-label a {
    color: var(--color-primary-500, #590808) !important;
    font-weight: 600;
}

/* ==================== Box Container ==================== */

.mm-box {
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--color-white, #ffffff);
}

.mm-box-top-container {
    background-color: var(--color-gray-100, #f9fafb);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.mm-box-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.mm-box-icon {
    width: 24px;
    height: 24px;
    background-color: var(--color-primary-500, #590808);
    border-radius: 6px;
    flex-shrink: 0;
}

.mm-box-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text, #1f2937);
}

.mm-box-down {
    padding: 20px;
}

/* ==================== Basket Table ==================== */

.mm-basket,
.mm-basket1 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
    margin-bottom: 16px;
}

.mm-basket thead,
.mm-basket1 thead {
    background-color: var(--color-gray-100, #f3f4f6);
}

.mm-basket th,
.mm-basket1 th {
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text, #374151);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    white-space: nowrap;
}

.mm-basket td,
.mm-basket1 td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid var(--color-border, #f3f4f6);
    vertical-align: middle;
}

.mm-basket tbody tr:last-child td,
.mm-basket1 tbody tr:last-child td {
    border-bottom: none;
}

.mm-basket tbody tr:hover,
.mm-basket1 tbody tr:hover {
    background-color: var(--color-gray-100, #f9fafb);
}

.mm-basket .pr_price,
.mm-basket .pr_total,
.mm-basket .mm-r1,
.mm-basket .mm-r2,
.mm-basket .mm-r3,
.mm-basket .mm-r4 {
    font-weight: 700;
    color: var(--color-primary-500, #590808);
}

/* ==================== Form Styles ==================== */

.mm-input,
.mm-select {
    width: 100%;
    max-width: 280px;
    padding: 10px 14px;
    border: 1px solid var(--color-gray-200, #e5e7eb);
    border-radius: 8px;
    background-color: var(--color-white, #ffffff);
    font-size: 14px;
    color: var(--color-text, #1f2937);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.mm-input:focus,
.mm-select:focus {
    border-color: var(--color-primary-500, #590808);
    box-shadow: 0 0 0 3px rgba(89, 8, 8, 0.1);
}

.mm-select {
    appearance: auto;
    cursor: pointer;
}

.mm-basket1 td.style2 {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* ==================== Buttons ==================== */

.mm-enter,
.mm-next,
.mm-add {
    display: inline-block;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
}

.mm-enter {
    background-color: var(--color-primary-500, #590808);
    color: #ffffff;
}

.mm-enter:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(89, 8, 8, 0.3);
}

.mm-next {
    background-color: var(--color-primary-500, #590808);
    color: #ffffff;
}

.mm-next:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(89, 8, 8, 0.3);
}

.mm-add {
    background-color: var(--color-primary-500, #590808);
    color: #ffffff;
}

.mm-add:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(89, 8, 8, 0.3);
}

.mm-form-actions {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==================== Panel Styles ==================== */

.mm-box-panel {
    margin-bottom: 16px;
}

.mm-box-panel-type-header {
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary-500, #590808), rgba(89, 8, 8, 0.3));
    border-radius: 2px;
    margin-bottom: 16px;
}

.mm-box-panel p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.7;
}

/* ==================== OK / Success ==================== */

.mm-ok_container {
    text-align: center;
    padding: 40px 20px;
}

/* ==================== Popover ==================== */

.popFade {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.popWindow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--color-white, #ffffff);
    border-radius: 16px;
    padding: 24px;
    z-index: 1000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
}

/* ==================== Empty Basket ==================== */

center {
    font-size: 16px;
    color: var(--color-gray-500, #6b7280);
    padding: 20px 0;
}

/* ==================== Responsive ==================== */

@media (max-width: 640px) {
    .mm-step {
        flex-wrap: nowrap;
        gap: 4px;
        padding: 0;
    }

    .mm-step::before {
        right: 24px;
        left: 24px;
    }

    .mm-steps .num {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .mm-steps .mm-step-label {
        font-size: 10px;
        max-width: 70px;
    }

    .mm-box-down {
        padding: 12px;
    }

    .mm-basket,
    .mm-basket1 {
        font-size: 12px;
    }

    .mm-basket th,
    .mm-basket td,
    .mm-basket1 th,
    .mm-basket1 td {
        padding: 8px 6px;
    }

    .mm-input,
    .mm-select {
        max-width: 100%;
    }

    .mm-enter,
    .mm-next,
    .mm-add {
        width: 100%;
        padding: 14px 20px;
    }
}

/* ==================== Dark Mode ==================== */

body.dark .mm-box {
    background-color: var(--color-dark-500, #1f2937);
    border-color: var(--color-gray-700, #374151);
}

body.dark .mm-box-top-container {
    background-color: var(--color-dark-600, #111827);
    border-color: var(--color-gray-700, #374151);
}

body.dark .mm-box-label {
    color: var(--color-white, #ffffff);
}

body.dark .mm-basket,
body.dark .mm-basket1 {
    border-color: var(--color-gray-700, #374151);
}

body.dark .mm-basket th,
body.dark .mm-basket1 th {
    background-color: var(--color-dark-600, #111827);
    color: var(--color-gray-200, #e5e7eb);
    border-color: var(--color-gray-700, #374151);
}

body.dark .mm-basket td,
body.dark .mm-basket1 td {
    border-color: var(--color-gray-700, #374151);
    color: var(--color-gray-200, #e5e7eb);
}

body.dark .mm-input,
body.dark .mm-select {
    background-color: var(--color-dark-600, #111827);
    border-color: var(--color-gray-700, #374151);
    color: var(--color-white, #ffffff);
}

body.dark .mm-steps .num {
    background-color: var(--color-gray-700, #374151);
    color: var(--color-gray-400, #9ca3af);
}

body.dark .mm-step::before {
    background-color: var(--color-gray-700, #374151);
}

body.dark .mm-steps .mm-step-label {
    color: var(--color-gray-400, #9ca3af);
}

body.dark .mm-steps .mm-step-label a {
    color: var(--color-gray-400, #9ca3af) !important;
}

body.dark .popWindow {
    background-color: var(--color-dark-500, #1f2937);
}

body.dark .popFade {
    background-color: rgba(0, 0, 0, 0.7);
}

/* ==================== Dark Mode - BShop ==================== */

body.dark .bs-product-card {
    background-color: var(--color-dark-500, #1f2937);
    border-color: var(--color-gray-700, #374151);
}

body.dark .bs-product-img {
    background-color: var(--color-dark-600, #111827);
}

body.dark .bs-product-title a {
    color: var(--color-gray-200, #e5e7eb);
}

body.dark .bs-product-title a:hover {
    color: var(--color-primary-500, #590808);
}

body.dark .bs-price-currency {
    color: var(--color-gray-400, #9ca3af);
}

body.dark .bs-action-btn {
    background-color: var(--color-dark-600, #111827);
    color: var(--color-gray-200, #e5e7eb);
}

body.dark .bs-action-btn:hover {
    background-color: var(--color-primary-500, #590808);
    color: #ffffff;
}

/* ==================== Dark Mode - Featured Card ==================== */

body.dark .bs-featured-card {
    background-color: var(--color-dark-500, #1f2937);
    border-color: var(--color-gray-700, #374151);
}

body.dark .bs-featured-img {
    background-color: var(--color-dark-600, #111827);
}

body.dark .bs-featured-title a {
    color: var(--color-gray-200, #e5e7eb);
}

body.dark .bs-featured-title a:hover {
    color: var(--color-primary-500, #590808);
}

body.dark .bs-featured-price .bs-price-currency {
    color: var(--color-gray-400, #9ca3af);
}

body.dark .bs-featured-short {
    color: var(--color-gray-400, #9ca3af);
}

body.dark .bs-featured-desc {
    border-color: var(--color-gray-700, #374151);
    color: var(--color-gray-400, #9ca3af);
}

/* ==================== Responsive - Featured Card ==================== */

@media (max-width: 640px) {
    .bs-featured-top {
        flex-direction: column;
    }

    .bs-featured-img {
        flex: none;
        max-width: 100%;
        aspect-ratio: 4 / 3;
    }

    .bs-featured-details {
        padding: 16px;
    }

    .bs-featured-title {
        font-size: 16px;
    }

    .bs-featured-price .bs-price-value {
        font-size: 20px;
    }

    .bs-featured-buy {
        width: 100%;
    }
}
