/* =========================================================
   THE KINGS MART — Product Cards
   TKM Theme v1.2
   ========================================================= */

.tkm-product-card {
    --tkm-blue: #0874f9;
    --tkm-blue-dark: #0459c2;
    --tkm-dark: #07111f;
    --tkm-text: #1c2b3d;
    --tkm-muted: #68778a;
    --tkm-border: #e2e9f1;

    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border: 1px solid var(--tkm-border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(31, 68, 108, 0.08);
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease;
}

.dark .tkm-product-card {
    border-color: rgba(255, 255, 255, 0.1);
    background: #0b1b2d;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.tkm-product-card:hover {
    z-index: 10;
    transform: translateY(-7px);
    border-color: rgba(8, 116, 249, 0.42);
    box-shadow:
        0 25px 55px rgba(30, 75, 130, 0.16),
        0 0 0 4px rgba(8, 116, 249, 0.04);
}

/* Image area */

.tkm-product-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 19px 19px 0 0;
    background:
        radial-gradient(circle at 50% 35%, rgba(8, 116, 249, 0.08), transparent 40%),
        linear-gradient(145deg, #f8fbff, #eef4fa);
}

.dark .tkm-product-media {
    background:
        radial-gradient(circle at 50% 35%, rgba(8, 116, 249, 0.14), transparent 42%),
        linear-gradient(145deg, #10243b, #0a1828);
}

.tkm-product-image-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
}

.tkm-product-image {
    width: 100%;
    height: 100%;
    display: block;
    padding: 16px;
    object-fit: contain;
    object-position: center;
    transition:
        transform 0.42s ease,
        filter 0.32s ease;
}

.tkm-product-card:hover .tkm-product-image {
    transform: scale(1.07);
    filter: drop-shadow(0 16px 18px rgba(20, 55, 95, 0.16));
}

/* Promotion badges */

.tkm-product-promotions {
    position: absolute;
    z-index: 5;
    top: 13px;
    left: 13px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.tkm-product-promotion {
    padding: 7px 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0874f9, #0459c2);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    box-shadow: 0 8px 20px rgba(8, 116, 249, 0.28);
}

/* Featured marker */

.tkm-product-featured {
    position: absolute;
    z-index: 5;
    top: 13px;
    right: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #0869dd;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 8px 22px rgba(26, 62, 102, 0.12);
    backdrop-filter: blur(8px);
}

.dark .tkm-product-featured {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(8, 25, 44, 0.88);
    color: #6db3ff;
}

/* Card content */

.tkm-product-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 18px 13px;
}

.tkm-product-meta {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-height: 20px;
    margin-bottom: 9px;
    overflow: hidden;
    color: var(--tkm-muted);
    font-size: 11px;
    font-weight: 700;
}

.tkm-product-meta a {
    color: var(--tkm-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.tkm-product-meta a:hover {
    color: var(--tkm-blue);
}

.dark .tkm-product-meta,
.dark .tkm-product-meta a {
    color: #96a9bf;
}

.tkm-product-name {
    margin: 0;
    color: var(--tkm-dark);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.4;
}

.dark .tkm-product-name {
    color: #ffffff;
}

.tkm-product-name a {
    color: inherit;
    text-decoration: none;
}

.dark .tkm-product-description {
    color: #a4b4c7;
}

.tkm-product-price-label {
    display: block;
    margin-bottom: 2px;
    color: var(--tkm-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.dark .tkm-product-price-label {
    color: #8da0b7;
}

.tkm-product-price {
    display: block;
    color: var(--tkm-blue);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.25;
}

/* Footer and Livewire controls */

.tkm-product-actions {
    position: relative;
    z-index: 8;
    padding: 0 18px 18px;
}

.tkm-product-actions > div {
    width: 100%;
}

.tkm-product-actions .flex.flex-col.items-start {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.tkm-product-actions .btn-primary {
    min-height: 43px;
    flex: 1;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #0c84ff, #075ec9);
    box-shadow: 0 10px 25px rgba(8, 116, 249, 0.22);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.tkm-product-actions .btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2393ff, #0452b3);
    box-shadow: 0 14px 30px rgba(8, 116, 249, 0.32);
}

.tkm-product-actions button.rounded-full {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    padding: 0;
    border: 1px solid var(--tkm-border);
    background: #f7faff;
    color: #43546a;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.dark .tkm-product-actions button.rounded-full {
    border-color: rgba(255, 255, 255, 0.12);
    background: #10253d;
    color: #d8e5f3;
}

.tkm-product-actions button.rounded-full:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 116, 249, 0.45);
    background: #eaf4ff;
    color: var(--tkm-blue);
}

.dark .tkm-product-actions button.rounded-full:hover {
    background: rgba(8, 116, 249, 0.16);
}

/* Variant popup */

.tkm-product-actions [x-show="show"] {
    border-radius: 14px !important;
    box-shadow: 0 18px 45px rgba(20, 52, 89, 0.18);
}

/* Homepage product sections */

.tkm-product-showcase {
    padding: 78px 0;
}

.tkm-product-showcase + .tkm-product-showcase {
    padding-top: 20px;
}

.tkm-product-section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 5px;
}

.tkm-product-section-copy {
    max-width: 720px;
}

.tkm-product-section-label {
    display: block;
    margin-bottom: 7px;
    color: var(--tkm-blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.tkm-product-section-title {
    margin: 0;
    color: var(--tkm-dark);
    font-size: clamp(28px, 3.5vw, 41px);
    font-weight: 900;
    letter-spacing: -1.1px;
    line-height: 1.15;
}

.dark .tkm-product-section-title {
    color: #ffffff;
}

.tkm-product-section-description {
    max-width: 630px;
    margin: 12px 0 0;
    color: var(--tkm-muted);
    font-size: 15px;
    line-height: 1.7;
}

.dark .tkm-product-section-description {
    color: #a8b8ca;
}

.tkm-product-section-arrows {
    position: static !important;
    display: inline-flex;
    gap: 8px;
    flex: 0 0 auto;
}

.tkm-product-section-arrows .splide__arrow {
    position: static !important;
    width: 43px !important;
    height: 43px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 1px solid var(--tkm-border) !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: 0 8px 22px rgba(28, 67, 109, 0.08);
}

.dark .tkm-product-section-arrows .splide__arrow {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: #0d2036 !important;
}

.tkm-product-section-arrows .splide__arrow:hover {
    border-color: var(--tkm-blue) !important;
    background: var(--tkm-blue) !important;
}

.tkm-product-section-arrows .splide__arrow:hover svg {
    fill: #ffffff !important;
}

.tkm-product-showcase .splide__track {
    overflow: visible;
}

.tkm-product-showcase .splide__slide {
    height: auto;
}

.tkm-product-showcase .splide__slide > div,
.tkm-product-showcase .splide__slide > div > div {
    height: 100%;
}

.tkm-product-progress {
    overflow: hidden;
    height: 4px;
    margin-top: 10px;
    border-radius: 999px;
    background: #e8eef5;
}

.dark .tkm-product-progress {
    background: #182b40;
}

.tkm-product-progress .progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0874f9, #5eaeff);
}

/* Responsive */

@media (max-width: 767px) {
    .tkm-product-content {
        padding: 15px 15px 11px;
    }

    .tkm-product-actions {
        padding: 0 15px 15px;
    }

    .tkm-product-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .tkm-product-section-arrows {
        width: 100%;
        justify-content: flex-end;
    }

    .tkm-product-showcase {
        padding: 58px 0;
    }
}

@media (max-width: 480px) {
    .tkm-product-name {
        font-size: 15px;
    }

    .tkm-product-price {
        font-size: 17px;
    }

    .tkm-product-description {
        min-height: 40px;
    }
}

.tkm-product-showcase {
    overflow: hidden;
}

.tkm-product-showcase .splide__track {
    overflow: hidden;
}

.tkm-product-showcase .splide__list {
    margin: 0 !important;
}

.tkm-product-showcase .splide__slide {
    min-width: 0;
}

/* =========================================================
   TKM Product Cards v2
   ========================================================= */

.tkm-product-statuses {
    position: absolute;
    z-index: 8;
    top: 14px;
    left: 14px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 8px;

    pointer-events: none;
}

.tkm-product-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 27px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(15, 42, 75, 0.16);
    backdrop-filter: blur(8px);
}

.tkm-product-status-new{

    background:linear-gradient(135deg,#0098ff,#0055d4);

    color:#fff;

    box-shadow:
        0 10px 24px rgba(0,116,249,.30);

}

.tkm-product-status-featured{

    background:linear-gradient(135deg,#7b3cff,#5228d8);

    color:#fff;

    box-shadow:
        0 10px 24px rgba(82,40,216,.30);

}

.tkm-product-status-low{

    background:linear-gradient(135deg,#ffb100,#ef7d00);

    color:#fff;

    box-shadow:
        0 10px 24px rgba(255,157,0,.30);

}

.tkm-product-status-out{

    background:linear-gradient(135deg,#ef4444,#b91c1c);

    color:#fff;

    border:1px solid rgba(255,255,255,.35);

    box-shadow:
        0 10px 25px rgba(185,28,28,.30),
        inset 0 1px 0 rgba(255,255,255,.20);

}

.tkm-product-stock::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
}

.tkm-product-stock.is-in {
    background: #eafaf1;
    color: #168348;
}

.tkm-product-stock.is-in::before {
    background: #22a75a;
}

.tkm-product-stock.is-low {
    background: #fff7e6;
    color: #b86600;
}

.tkm-product-stock.is-low::before {
    background: #f59e0b;
}

.tkm-product-stock.is-out {
    background: #fff0f0;
    color: #c63434;
}

.tkm-product-stock.is-out::before {
    background: #ef4444;
}

.dark .tkm-product-stock.is-in {
    background: rgba(34, 167, 90, 0.13);
    color: #77dfa2;
}

.dark .tkm-product-stock.is-low {
    background: rgba(245, 158, 11, 0.13);
    color: #f9c56b;
}

.dark .tkm-product-stock.is-out {
    background: rgba(239, 68, 68, 0.13);
    color: #ff9696;
}

/* Compact cards for the header drawer */

.tkm-product-card-compact {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 110px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: none;
}

.tkm-product-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(25, 61, 104, 0.12);
}

.tkm-product-card-compact .tkm-product-media {
    width: 96px;
    aspect-ratio: auto;
    min-height: 110px;
    border-radius: 13px 0 0 13px;
}

.tkm-product-card-compact .tkm-product-image {
    padding: 10px;
}

.tkm-product-card-compact .tkm-product-promotions,
.tkm-product-card-compact .tkm-product-statuses {
    display: none;
}

.tkm-product-card-compact .tkm-product-content {
    min-width: 0;
    padding: 13px 14px;
}

.tkm-product-card-compact .tkm-product-meta {
    margin-bottom: 5px;
    font-size: 10px;
}

.tkm-product-card-compact .tkm-product-name {
    min-height: auto;
    font-size: 13px;
    line-height: 1.35;
}

.tkm-product-card-compact .tkm-product-price-row {
    margin-top: 9px;
    padding-top: 0;
}

.tkm-product-card-compact .tkm-product-price-label {
    display: none;
}

.tkm-product-card-compact .tkm-product-price {
    font-size: 15px;
}

@media (max-width: 480px) {
    .tkm-product-stock {
        display: none;
    }

    .tkm-product-statuses {
        top: 10px;
        right: 10px;
    }

    .tkm-product-promotions {
        top: 10px;
        left: 10px;
    }
}

/* =========================================================
   TKM Product Card — Premium Price Area
   ========================================================= */

.tkm-product-price-box {
    margin-top: auto;
    padding-top: 18px;
}

.tkm-product-price-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 16px;
    border: 1px solid #e4ebf3;
    border-radius: 14px;
    background:
        radial-gradient(
            circle at top right,
            rgba(8, 116, 249, 0.08),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #ffffff,
            #f7faff
        );
}

.dark .tkm-product-price-main {
    border-color: rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(
            circle at top right,
            rgba(8, 116, 249, 0.14),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #10233a,
            #0b1a2c
        );
}

.tkm-product-price-label {
    margin-bottom: 4px;
    color: #758397;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.dark .tkm-product-price-label {
    color: #94a8bf;
}

.tkm-product-price {
    color: #0874f9;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.tkm-product-stock-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.tkm-product-stock-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
}

.tkm-product-stock-row.is-in {
    background: #eafaf1;
    color: #167a45;
}

.tkm-product-stock-row.is-in .tkm-product-stock-dot {
    background: #22a75a;
    box-shadow: 0 0 0 4px rgba(34, 167, 90, 0.12);
}

.tkm-product-stock-row.is-low {
    background: #fff7e6;
    color: #a86100;
}

.tkm-product-stock-row.is-low .tkm-product-stock-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.tkm-product-stock-row.is-out {
    background: #fff0f0;
    color: #bd3030;
}

.tkm-product-stock-row.is-out .tkm-product-stock-dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.dark .tkm-product-stock-row.is-in {
    background: rgba(34, 167, 90, 0.13);
    color: #7be1a6;
}

.dark .tkm-product-stock-row.is-low {
    background: rgba(245, 158, 11, 0.13);
    color: #f8c36c;
}

.dark .tkm-product-stock-row.is-out {
    background: rgba(239, 68, 68, 0.13);
    color: #ff9999;
}

/* Compact card price */

.tkm-product-card-compact .tkm-product-price-box {
    padding-top: 8px;
}

.tkm-product-card-compact .tkm-product-price-main {
    padding: 0;
    border: 0;
    background: transparent;
}

.tkm-product-card-compact .tkm-product-price {
    font-size: 15px;
}

@media (max-width: 480px) {
    .tkm-product-price {
        font-size: 20px;
    }

    .tkm-product-price-main {
        padding: 13px 14px;
    }
}
