/*
 * Chef's Restaurant Store - Main Stylesheet
 * Adapted from Q2A KingMedia theme
 * Font: Nunito | Accent: #1DB954 | Border-radius: 14px
 * -------------------------------------------------------- */

/* =========================================================
   0. GOOGLE FONTS
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700&display=swap');

/* =========================================================
   1. RESET / BASE
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #f6f7f9;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.8em;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5 {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }
h5 { font-size: 16px; }

p {
    margin: 0 0 10px;
}

button {
    font-family: 'Nunito', sans-serif;
}

input,
select,
textarea {
    font-family: 'Nunito', sans-serif;
}

/* =========================================================
   1b. BODY LAYOUT
   ========================================================= */
.king-body {
    padding-left: 80px;
    min-height: 100vh;
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.king-body-in {
    width: 100%;
    padding: 20px 2% 0 2%;
}

/* =========================================================
   2. HEADER (.king-header)
   ========================================================= */
.king-headerf {
    position: sticky;
    top: 0;
    z-index: 12;
}

.king-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 66px;
    padding: 0 2%;
    background: #ffffffb8;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Header Left */
.header-left {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    gap: 12px;
}

.king-logo {
    display: flex;
    align-items: center;
    max-height: 66px;
}

.king-logo img {
    max-height: 60px;
    width: auto;
}

.king-logo-link {
    text-decoration: none;
    color: inherit;
}

.king-logo-link strong {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* One-page Layout (login, register, cart empty, order confirm) */
.king-main.one-page {
    max-width: 900px;
    margin: 0 auto;
}

.king-main-in {
    padding: 0;
}

.king-inner {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 2px 4px 12px rgb(0 0 0 / 8%);
}

#ltoggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0;
}

/* Header Middle */
.header-middle {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    max-width: 520px;
    margin: 0 20px;
}

.header-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    background: #f6f7f9;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.header-search-form:focus-within {
    border-color: #1DB954;
    background: #fff;
}

.header-search-form .king-search-field {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 8px 14px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 500;
    outline: 0;
    color: #1d1d1f;
    height: 38px;
}

.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #8a8997;
    font-size: 14px;
    transition: color 0.2s ease;
}

.header-search-btn:hover {
    color: #1DB954;
}

/* Live Search Dropdown */
.header-middle {
    position: relative;
}

.live-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.live-search-results.open {
    display: block;
}

.live-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #1d1d1f;
    transition: background 0.1s ease;
    border-bottom: 1px solid #f0f0f2;
}

.live-result-item:last-child {
    border-bottom: 0;
}

.live-result-item:hover {
    background: #f6f7f9;
}

.live-result-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f2;
}

.live-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.live-result-info strong {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-result-info span {
    font-size: 13px;
    color: #1DB954;
    font-weight: 700;
}

.live-no-results {
    padding: 16px;
    text-align: center;
    color: #8a8997;
    font-size: 14px;
}

.king-nav-head-list {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.king-nav-head-link {
    position: relative;
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #0c0b0d;
    height: 66px;
    line-height: 66px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.king-nav-head-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 16px;
    width: 100%;
    height: 2px;
    background: #1DB954;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.king-nav-head-link:hover::after,
.king-nav-head-selected .king-nav-head-link::after {
    transform: scaleX(1);
}

.king-nav-head-link:hover {
    color: #0d0c22;
}

.king-nav-head-selected .king-nav-head-link {
    color: #0d0c22;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    justify-content: flex-end;
}

.header-right ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.header-right ul li {
    display: flex;
    align-items: center;
}

/* Search Button in Header */
.king-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #f6f7f9;
    border: 0;
    cursor: pointer;
    color: #0c0b0d;
    font-size: 16px;
    transition: background 0.2s ease;
}

.king-search-btn:hover {
    background: #edeef0;
}

/* =========================================================
   3. LEFT SIDEBAR (.leftmenu)
   ========================================================= */
.leftmenu {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 13;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.leftmenu:hover {
    width: 280px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
}

.leftmenu-top {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 66px;
    padding: 0 20px;
}

.leftmenu-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Dark Mode Toggle */
.king-nightb {
    position: relative;
    width: 34px;
    height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 32px;
    background: #f6f7f9;
    cursor: pointer;
    margin: 12px auto;
    padding: 4px;
    border: 0;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.king-nightb::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    top: 4px;
    left: 4px;
    transition: top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.king-lnight .king-nightb::after {
    top: calc(100% - 30px);
}

.king-nightb i {
    position: relative;
    z-index: 1;
    font-size: 13px;
    line-height: 26px;
    color: #646373;
}

#king-lnight {
    display: none;
}

/* Hamburger Close Button */
.king-left-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
    padding: 0;
}

.king-left-close span {
    display: block;
    width: 18px;
    height: 2px;
    background: #0c0b0d;
    border-radius: 2px;
    position: absolute;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.king-left-close span:first-child {
    top: 12px;
}

.king-left-close span:last-child {
    top: 20px;
}

.king-left-close.open span:first-child {
    top: 16px;
    transform: rotate(45deg);
}

.king-left-close.open span:last-child {
    top: 16px;
    transform: rotate(-45deg);
}

/* Sidebar Nav */
.king-nav-main {
    min-width: 250px;
    width: 100%;
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.king-nav-main-link {
    display: block;
    padding: 12px 0 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #646373;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.king-nav-main-link:hover {
    color: #1DB954;
}

.king-nav-main-selected .king-nav-main-link,
.king-nav-main-link.active {
    color: #1DB954;
}

.king-nav-main-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.king-nav-main-item {
    position: relative;
}

.king-nav-main-link i {
    display: inline-block;
    margin-right: 14px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.king-nav-main-link.king-nav-main-selected {
    color: #1DB954;
    font-weight: 600;
}

/* Sidebar User Section */
.usrleft {
    padding: 16px 20px;
    border-top: 1px solid #f0f1f3;
    flex-shrink: 0;
}

.king-havatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f1f3;
    color: #646373;
    font-size: 14px;
    transition: all 0.2s ease;
}

.king-havatar:hover {
    background: #1DB954;
    color: #fff;
}

/* Sidebar Scrollbar */
.kingscroll::-webkit-scrollbar {
    width: 6px;
}

.kingscroll::-webkit-scrollbar-track {
    background: transparent;
}

.kingscroll::-webkit-scrollbar-thumb {
    background: #d9dce1;
    border-radius: 3px;
}

.kingscroll::-webkit-scrollbar-thumb:hover {
    background: #1DB954;
}

/* =========================================================
   4. SEARCH (.king-search)
   ========================================================= */
.king-search {
    position: fixed;
    top: -600px;
    left: 0;
    right: 0;
    z-index: 19;
    opacity: 0;
    background: #fff;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    padding: 60px 20px;
    text-align: center;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.king-search.open {
    top: 0;
    opacity: 1;
}

.king-search-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7f9;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px;
    color: #0c0b0d;
    transition: background 0.2s ease;
}

.king-search-close:hover {
    background: #edeef0;
}

.king-search-field {
    height: 52px;
    border: 2px solid #e7e7e9;
    border-radius: 14px;
    width: 100%;
    max-width: 640px;
    padding: 0 20px;
    font-size: 16px;
    font-family: 'Nunito', sans-serif;
    font-weight: 500;
    outline: 0;
    color: #1d1d1f;
    transition: border-color 0.2s ease;
}

.king-search-field:focus {
    border-color: #1DB954;
}

.king-search-field::placeholder {
    color: #8a8997;
}

/* Live Results */
.liveresults {
    max-width: 640px;
    margin: 16px auto 0;
    text-align: left;
}

.liveresults a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    transition: background 0.15s ease;
}

.liveresults a:hover {
    background: #f6f7f9;
}

.liveresults img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.liveresults .search-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

.liveresults .search-meta {
    font-size: 12px;
    color: #8a8997;
}

/* Search Discover Tags */
.search-disc {
    max-width: 640px;
    margin: 20px auto 0;
    text-align: left;
}

.search-disc h4 {
    font-size: 13px;
    font-weight: 600;
    color: #8a8997;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.disc-tags {
    display: inline-block;
    background: #f6f7f9;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    color: #646373;
    margin: 0 6px 8px 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.disc-tags:hover {
    background: #0c0b0d;
    color: #fff;
}

/* Search Overlay */
.king-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 18;
    background: rgba(0, 0, 0, 0.4);
    display: none;
}

.king-search-overlay.open {
    display: block;
}

/* =========================================================
   5. HERO SECTION (.king-body-search-up)
   ========================================================= */
.king-body-search-up {
    position: relative;
    display: flex;
    min-height: 350px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 30px;
}

.king-body-search-up img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.king-body-search {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(246, 247, 249, 0.6) 0%, rgba(246, 247, 249, 0.9) 100%);
    z-index: 1;
}

.king-body-search h1 {
    font-size: 48px;
    font-weight: 700;
    color: #0c0b0d;
    margin-bottom: 12px;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 6px;
    text-decoration-thickness: 3px;
    background-image: linear-gradient(#1DB954, #17a34a);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.king-body-search h3 {
    font-size: 16px;
    font-weight: 500;
    color: #646373;
    max-width: 500px;
}

/* =========================================================
   6. SUB NAVIGATION
   ========================================================= */
.leo-nav {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2%;
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    max-width: 100%;
}
.nav-scroll-wrapper {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.nav-scroll-btn {
    background: none;
    border: none;
    color: #646373;
    cursor: pointer;
    padding: 8px 6px;
    font-size: 14px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.nav-scroll-btn:hover {
    color: #0c0b0d;
}


.king-nav-sub-list {
    display: flex;
    list-style: none;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    margin: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.king-nav-sub-list::-webkit-scrollbar {
    display: none;
}

.king-nav-sub-link {
    display: inline-block;
    background: #f6f7f9;
    padding: 6px 18px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    color: #646373;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.king-nav-sub-link:hover,
.king-nav-sub-selected .king-nav-sub-link {
    background: #0c0b0d;
    color: #fff;
}

/* Range Slider */
.leo-range {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #646373;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.leo-slider {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: #e7e7e9;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.leo-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0c0b0d;
    cursor: pointer;
    border: 0;
}

.leo-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0c0b0d;
    cursor: pointer;
    border: 0;
}

/* =========================================================
   7. PRODUCT GRID
   ========================================================= */
#container {
    margin-top: 20px;
}

.king-part-q-list {
    display: flex;
    position: relative;
}

.container {
    display: block;
    font-size: 0;
    flex: 3;
    margin: 0 -0.5%;
    padding-bottom: 80px;
}

.box {
    display: inline-block;
    width: 25%;
    padding: 0 0.5% 1%;
    font-size: 14px;
    position: relative;
    vertical-align: top;
}

/* Column Width Classes */
.column-1  { width: 100%; }
.column-2  { width: 50%; }
.column-3  { width: 33.333%; }
.column-4  { width: 25%; }
.column-5  { width: 20%; }
.column-6  { width: 16.666%; }
.column-7  { width: 14.285%; }
.column-8  { width: 12.5%; }
.column-9  { width: 11.111%; }
.column-10 { width: 10%; }

/* Product Card */
.product-card,
.king-q-item-main {
    overflow: hidden;
    background: #fff;
    box-shadow: 2px 4px 12px rgb(0 0 0 / 8%);
    border-radius: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product-card:hover,
.king-q-item-main:hover {
    box-shadow: 2px 8px 24px rgb(0 0 0 / 12%);
}

/* Item Link Wrapper */
.item-a {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    flex: 1;
    z-index: 1;
    line-height: 0;
}

/* Featured Image */
.post-featured-img {
    display: block;
    background: #e1e0e5;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .item-img,
.king-q-item-main:hover .item-img {
    transform: scale(1.07);
}

/* Lazy Load */
.king-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.king-lazy.loaded,
.king-lazy[data-loaded="true"] {
    opacity: 1;
}

/* =========================================================
   8. PRODUCT CARD CONTENT
   ========================================================= */
.product-info {
    padding: 12px 16px;
}

.product-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 4px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.product-info .product-sku {
    font-size: 11px;
    color: #8a8997;
    margin: 0;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #1DB954;
    line-height: 1.3;
}

.product-price-each {
    font-size: 13px;
    font-weight: 600;
    color: #b0afba;
    margin-left: 6px;
}

.product-price-original {
    font-size: 14px;
    font-weight: 400;
    color: #8a8997;
    text-decoration: line-through;
    margin-left: 8px;
}

/* Card Actions */
.product-card-actions {
    padding: 0 16px 12px;
}

.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1DB954;
    color: #fff;
    border: 0;
    border-radius: 14px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    width: 100%;
    height: 40px;
    transition: all 0.2s ease;
}

/* Product Image Wrapper (for quick view overlay) */
.product-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.product-img-wrap .quick-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.product-img-wrap:hover .quick-view-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.product-img-wrap:hover .post-featured-img::after {
    opacity: 1;
}

.post-featured-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
    pointer-events: none;
}

.quick-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    white-space: nowrap;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-view-btn:hover {
    background: rgba(29, 185, 84, 0.85);
    border-color: #1DB954;
    color: #fff;
}

.add-to-cart-btn:hover {
    background: #1ed760;
    transform: translateY(-1px);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn i {
    margin-right: 6px;
}

/* Product Badge (Sale, New, etc.) */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #1DB954;
    z-index: 2;
}

.product-badge.sale {
    background: #dd5758;
}

.product-badge.new {
    background: #1DB954;
}

/* =========================================================
   9. PAGINATION / INFINITE SCROLL
   ========================================================= */
.ias-trigger-next,
.load-nomore {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 42px;
    width: 280px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Nunito', sans-serif;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ias-trigger-next {
    background: #1d1d1f;
    box-shadow: 0 4px 12px rgba(29, 29, 31, 0.3);
}

.ias-trigger-next a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ias-trigger-next:hover {
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.4);
}

.load-nomore {
    background: #fff;
    color: #73859f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: default;
}

/* Switch Loader */
.switch-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.loader {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 28px;
}

.loader span {
    display: inline-block;
    width: 6px;
    border-radius: 3px;
    animation: loaderBounce 0.6s infinite alternate;
}

.loader span:nth-child(1) {
    background: #6377d8;
    animation-delay: 0s;
}

.loader span:nth-child(2) {
    background: #f6a226;
    animation-delay: 0.2s;
}

.loader span:nth-child(3) {
    background: #dd5758;
    animation-delay: 0.4s;
}

@keyframes loaderBounce {
    0%   { height: 8px; }
    100% { height: 28px; }
}

/* =========================================================
   10. FOOTER (.king-footer)
   ========================================================= */
.king-footer {
    padding: 20px 2%;
    margin-top: 30px;
    background: #fff;
    border-radius: 14px;
    text-align: center;
    font-size: 12px;
    color: #758399;
}

.footer-content {
    padding: 10px 0;
}

.footer-content p {
    margin: 4px 0;
    font-size: 13px;
    color: #8a8997;
}

.king-footer a {
    color: #1d1d1f;
    transition: color 0.2s ease;
}

.king-footer a:hover {
    color: #1DB954;
}

.king-nav-footer-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    text-align: left;
}

.king-nav-footer-list li a {
    font-size: 13px;
    font-weight: 500;
    color: #646373;
}

.king-nav-footer-list li a:hover {
    color: #1DB954;
}

.king-footer-copy {
    padding-top: 16px;
    border-top: 1px solid #f0f1f3;
    font-size: 12px;
    color: #8a8997;
}

/* =========================================================
   11. FORMS
   ========================================================= */
.king-form-tall-text,
.king-form-tall-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e7e7e9;
    border-radius: 14px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 500;
    outline: 0;
    box-sizing: border-box;
    color: #1d1d1f;
    background: #fff;
    transition: border-color 0.2s ease;
}

.king-form-tall-text:focus,
.king-form-tall-select:focus {
    border-color: #1DB954;
}

.king-form-tall-text::placeholder {
    color: #8a8997;
}

.king-form-tall-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1DB954;
    color: #fff;
    border: 0;
    padding: 12px 28px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.king-form-tall-button:hover {
    background: #1ed760;
}

.king-form-tall-button:active {
    transform: scale(0.98);
}

.king-form-tall-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #646373;
}

.king-form-wide-label {
    font-size: 14px;
    font-weight: 500;
    color: #646373;
    padding: 10px 0;
}

.king-form-wide-data {
    padding: 10px 0;
}

/* Textarea */
.king-form-tall-text[rows] {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

/* Toggle Switch */
.checkbox {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e7e7e9;
    border-radius: 26px;
    transition: background 0.25s ease;
}

.checkbox .slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease;
}

.checkbox input:checked + .slider {
    background: #1DB954;
}

.checkbox input:checked + .slider::before {
    transform: translateX(20px);
}

/* =========================================================
   12. CART & CHECKOUT
   ========================================================= */

/* Cart Icon / Badge */
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #f6f7f9;
    color: #0c0b0d;
    font-size: 18px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.cart-icon:hover {
    background: #edeef0;
}

.cart-badge {
    position: absolute;
    right: -6px;
    top: -6px;
    width: 18px;
    height: 18px;
    background: #1DB954;
    border-radius: 100%;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e7e7e9;
    border-radius: 14px;
    overflow: hidden;
}

.qty-selector button {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 0;
    font-size: 18px;
    cursor: pointer;
    color: #0c0b0d;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.qty-selector button:hover {
    background: #f6f7f9;
}

.qty-selector input {
    width: 50px;
    text-align: center;
    border: 0;
    border-left: 1px solid #e7e7e9;
    border-right: 1px solid #e7e7e9;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    color: #1d1d1f;
    outline: 0;
    height: 36px;
    -moz-appearance: textfield;
}

.qty-selector input::-webkit-outer-spin-button,
.qty-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Order Table */
.order-table {
    width: 100%;
    border-collapse: collapse;
}

.order-table th {
    background: #f6f7f9;
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #646373;
}

.order-table td {
    padding: 12px;
    border-bottom: 1px solid #f6f7f9;
    font-size: 14px;
    color: #1d1d1f;
}

.order-table td img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.cart-product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-product-cell img {
    border-radius: 10px;
    object-fit: cover;
    background: #f6f7f9;
}

.cart-product-cell a {
    color: inherit;
}

.cart-product-cell a:hover strong {
    color: #1DB954;
}

.cart-product-cell small {
    color: #8a8997;
}

.cart-remove-btn {
    background: none;
    border: 0;
    cursor: pointer;
    color: #8a8997;
    font-size: 14px;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.cart-remove-btn:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: #8a8997;
    font-size: 14px;
}

.continue-shopping:hover {
    color: #1DB954;
}

/* Cart Summary */
.cart-summary {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 2px 4px 12px rgb(0 0 0 / 8%);
}

.cart-summary h3 {
    margin-bottom: 16px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #646373;
}

.cart-summary-row.total {
    border-top: 2px solid #f6f7f9;
    margin-top: 8px;
    padding-top: 16px;
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
}

.cart-summary-row.total .product-price {
    font-size: 18px;
}

/* Checkout Layout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

.checkout-form-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 16px;
}

.checkout-form-section h3:first-child {
    margin-top: 0;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f2;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #646373;
}

.summary-total {
    border-top: 2px solid #f0f0f2;
    margin-top: 8px;
    padding-top: 16px;
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
}

.checkout-btn {
    margin-top: 16px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8a8997;
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: #d9dce1;
}

/* =========================================================
   12B. ACCOUNT PAGE
   ========================================================= */
.account-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.account-section .king-inner {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 2px 4px 12px rgb(0 0 0 / 8%);
}

.account-section .king-inner h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Form Layout (shared between storefront and admin) */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 16px;
}

/* Auth Forms (Login/Register) */
.auth-form {
    max-width: 420px;
    margin: 0 auto;
    padding: 10px 0;
}

.auth-form h1 {
    font-size: 24px;
    margin-bottom: 24px;
}

.auth-form h1 i {
    color: #1DB954;
    margin-right: 8px;
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #8a8997;
}

.auth-switch a {
    color: #1DB954;
    font-weight: 600;
}


/* =========================================================
   13. PRODUCT DETAIL PAGE
   ========================================================= */
.product-detail {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.product-gallery {
    flex: 3;
    position: relative;
}

.product-main-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 14px;
    background: #151419;
    display: block;
}

.product-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.product-thumb {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
    background: #151419;
}

.product-thumb:hover,
.product-thumb.active {
    opacity: 1;
    border-color: #1DB954;
}

.product-detail-info {
    flex: 2;
}

.product-detail-info h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #1d1d1f;
}

.product-detail-info .product-price {
    font-size: 32px;
    font-weight: 700;
    color: #1DB954;
    margin-bottom: 16px;
}

.product-detail-info .product-meta {
    color: #8a8997;
    font-size: 13px;
    margin: 10px 0;
    line-height: 1.6;
}

.product-detail-info .product-meta span {
    display: inline-block;
    margin-right: 16px;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.product-description {
    padding: 16px 0;
    border-top: 1px solid #f0f1f3;
    margin-top: 16px;
}

.product-description h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.entry-content {
    font-size: 14px;
    line-height: 1.8;
    color: #646373;
}

.stock-in {
    color: #1DB954;
    font-weight: 600;
}

.stock-out {
    color: #dc3545;
    font-weight: 600;
}

.product-detail-desc {
    padding: 16px 0;
    border-top: 1px solid #f0f1f3;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.8;
    color: #646373;
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.product-detail-actions .add-to-cart-btn,
.product-add-section .add-to-cart-btn {
    width: auto;
    padding: 12px 36px;
    height: 48px;
    font-size: 15px;
}

/* Related Products */
.king-related {
    margin-top: 30px;
    padding: 24px;
    background: #f6f7f9;
    border-radius: 14px;
}

.king-related h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.related-grid .box {
    width: 100%;
}

/* No Products / Empty State */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #8a8997;
}

.no-products p {
    font-size: 16px;
    margin-bottom: 16px;
}

/* Product Count Badge */
.product-count {
    display: inline-block;
    font-size: 13px;
    color: #8a8997;
    margin-top: 4px;
}

/* Search Page Form */
.search-page-form {
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-page-form form {
    display: flex;
    gap: 12px;
}

.search-page-form .king-search-field {
    flex: 1;
}

/* =========================================================
   14. FLASH MESSAGES
   ========================================================= */
.flash-message {
    padding: 14px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.flash-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.flash-message i {
    font-size: 18px;
}

/* =========================================================
   15. MODALS (.king-modal-login)
   ========================================================= */
.king-modal-login {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: rgb(111 105 132 / 92%);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.king-modal-login.open,
.king-modal-login.show {
    display: flex;
}

.king-modal-content {
    background: #fff;
    max-width: 440px;
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.king-modal-header {
    text-align: center;
    padding: 25px 0 10px;
}

.king-modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.king-modal-header p {
    font-size: 14px;
    color: #8a8997;
    margin: 8px 0 0;
}

.king-modal-form {
    max-width: 300px;
    margin: 0 auto;
    padding: 25px 0;
}

.king-modal-form .king-form-tall-text {
    margin-bottom: 12px;
}

.king-modal-form .king-form-tall-button {
    width: 100%;
    margin-top: 8px;
}

.king-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7f9;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #646373;
    transition: background 0.2s ease;
}

.king-modal-close:hover {
    background: #edeef0;
}

/* Quick View Modal */
.quickview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quickview-overlay.open {
    display: flex;
}

.quickview-modal {
    background: #fff;
    max-width: 800px;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.quickview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    transition: background 0.2s ease;
}

.quickview-close:hover {
    background: rgba(0,0,0,0.8);
}

.quickview-body {
    display: flex;
}

.quickview-image {
    flex: 1;
    background: #f6f7f9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.quickview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 500px;
}

.quickview-info {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.quickview-info h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1d1d1f;
}

.quickview-meta {
    font-size: 13px;
    color: #8a8997;
    margin-bottom: 16px;
}

.quickview-price {
    margin-bottom: 16px;
}

.quickview-price .product-price {
    font-size: 28px;
    font-weight: 700;
    color: #1DB954;
}

.quickview-price .product-price-each {
    font-size: 16px;
    display: block;
    margin-left: 0;
    margin-top: 4px;
}

.quickview-price .product-price-original {
    font-size: 18px;
}

.quickview-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #646373;
    margin-bottom: 20px;
    flex: 1;
}

.quickview-actions {
    display: flex;
    gap: 10px;
}

.quickview-actions .add-to-cart-btn {
    flex: 1;
    width: auto;
    height: 44px;
    font-size: 14px;
}

.quickview-actions .king-form-tall-button {
    height: 44px;
    font-size: 14px;
    text-decoration: none;
}

.quickview-overlay.loading .quickview-body {
    min-height: 300px;
    align-items: center;
    justify-content: center;
}

.quickview-overlay.loading .quickview-body::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid #e7e7e9;
    border-top-color: #1DB954;
    border-radius: 50%;
    animation: qvSpin 0.6s linear infinite;
}

.quickview-overlay.loading .quickview-image,
.quickview-overlay.loading .quickview-info {
    display: none;
}

@keyframes qvSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 725px) {
    .quickview-body {
        flex-direction: column;
    }
    .quickview-image {
        max-height: 250px;
    }
    .quickview-info {
        padding: 20px;
    }
}

/* =========================================================
   16. TOOLTIPS
   ========================================================= */
.tooltip {
    position: absolute;
    z-index: 1070;
    display: block;
    background: #0c0b0dd6;
    color: #fff;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Nunito', sans-serif;
    border-radius: 14px;
    line-height: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.tooltip.in {
    opacity: 0.9;
}

/* Tooltip Arrows */
.tooltip .tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: solid transparent;
}

.tooltip.top .tooltip-arrow {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-top-color: #0c0b0dd6;
}

.tooltip.right .tooltip-arrow {
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    border-width: 5px 5px 5px 0;
    border-right-color: #0c0b0dd6;
}

.tooltip.bottom .tooltip-arrow {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 5px 5px;
    border-bottom-color: #0c0b0dd6;
}

.tooltip.left .tooltip-arrow {
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-left-color: #0c0b0dd6;
}

/* =========================================================
   17. ADMIN STYLES
   ========================================================= */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
}

.admin-table th {
    background: #f6f7f9;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    color: #646373;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f6f7f9;
    font-size: 14px;
    color: #1d1d1f;
}

.admin-table tr:hover td {
    background: #fafbfc;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 2px 4px 12px rgb(0 0 0 / 8%);
    margin-bottom: 20px;
}

.admin-stat {
    text-align: center;
    padding: 20px;
}

.admin-stat h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1DB954;
    margin: 0 0 4px;
}

.admin-stat p {
    font-size: 13px;
    color: #8a8997;
    margin: 0;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-shipped {
    background: #d4edda;
    color: #155724;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Admin Grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-actions a,
.admin-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f6f7f9;
    border: 0;
    cursor: pointer;
    color: #646373;
    font-size: 14px;
    transition: all 0.15s ease;
}

.admin-actions a:hover,
.admin-actions button:hover {
    background: #1DB954;
    color: #fff;
}

.admin-actions .delete-btn:hover {
    background: #dd5758;
    color: #fff;
}

/* =========================================================
   18. PAYMENT METHODS
   ========================================================= */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.payment-option {
    display: block;
    border: 2px solid #e7e7e9;
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.payment-option:hover {
    border-color: #1DB954;
}

.payment-option.selected,
.payment-option:has(input:checked) {
    border-color: #1DB954;
    background: rgba(29, 185, 84, 0.06);
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-option-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.payment-icon {
    font-size: 22px;
    color: #1DB954;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.payment-option-content strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 2px;
}

.payment-option-content p {
    font-size: 13px;
    color: #8a8997;
    margin: 0;
}

.checkout-btn {
    width: 100%;
    margin-top: 16px;
    height: 48px;
    font-size: 16px;
    font-weight: 600;
}

.cod-fee-row {
    color: #8a8997;
    font-size: 14px;
}

/* =========================================================
   18b. REORDER SECTION
   ========================================================= */
.reorder-section {
    margin-bottom: 24px;
}

.reorder-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.reorder-section-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.reorder-section-header h3 i {
    color: #1DB954;
    margin-right: 8px;
}

.reorder-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1DB954;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.reorder-all-btn:hover {
    background: #18a349;
}

.reorder-grid {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.reorder-grid::-webkit-scrollbar {
    height: 4px;
}

.reorder-grid::-webkit-scrollbar-thumb {
    background: #d9dce1;
    border-radius: 4px;
}

.reorder-card {
    flex: 0 0 180px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 2px 4px 12px rgb(0 0 0 / 8%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reorder-card:hover {
    transform: translateY(-2px);
    box-shadow: 2px 6px 20px rgb(0 0 0 / 12%);
}

.reorder-card-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    background: #f6f7f9;
}

.reorder-card-body {
    padding: 12px;
}

.reorder-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.reorder-card-name:hover {
    color: #1DB954;
}

.reorder-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #1DB954;
    display: block;
    margin-bottom: 8px;
}

.reorder-card-meta {
    font-size: 11px;
    color: #8a8997;
    margin-bottom: 8px;
}

.reorder-card .add-to-cart-btn {
    width: 100%;
    height: 34px;
    font-size: 12px;
    border-radius: 10px;
}


/* Delivery Banner */
.header-delivery-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-delivery-text {
    color: #1DB954;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.header-delivery-text i {
    margin-right: 4px;
}

.header-signup-btn {
    background: #1DB954 !important;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
    display: inline-block;
}

.header-signup-btn:hover {
    background: #17a348 !important;
    transform: scale(1.05);
}

@media (max-width: 725px) {
    .header-delivery-text {
        display: none;
    }
}

@media (max-width: 500px) {
    .header-signup-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
}
/* =========================================================
   19. RESPONSIVE
   ========================================================= */

/* Large Tablets / Small Desktops */
@media (max-width: 1200px) {
    .king-nav-sub-list {
        scrollbar-width: none;
    }

    .king-nav-sub-list::-webkit-scrollbar {
        height: 3px;
    }

    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 991px) {
    .header-middle {
        max-width: 300px;
    }

    .leo-range {
        display: none;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .box {
        width: 33.333%;
    }

    .product-detail {
        gap: 20px;
    }

    .product-detail-info h1 {
        font-size: 24px;
    }

    .product-detail-info .product-price {
        font-size: 28px;
    }

    .king-body-search h1 {
        font-size: 36px;
    }

    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Landscape / Small Tablets */
@media (max-width: 725px) {
    .king-body {
        padding-left: 0;
    }

    .leftmenu {
        left: -600px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-page-form form {
        flex-direction: column;
    }

    .king-body.active {
        padding-left: 80px;
    }

    .king-body.active .leftmenu {
        left: 0;
    }

    #ltoggle {
        display: flex;
    }

    .header-middle {
        max-width: 200px;
    }

    .box {
        width: 50%;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .payment-option {
        padding: 12px 14px;
    }

    .reorder-card {
        flex: 0 0 160px;
    }

    .product-detail {
        flex-direction: column;
    }

    .product-gallery,
    .product-detail-info {
        flex: auto;
    }

    .king-body-search h1 {
        font-size: 28px;
    }

    .king-body-search-up {
        min-height: 260px;
    }

    .king-nav-footer-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-grid {
        grid-template-columns: 1fr 1fr;
    }

    .order-table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
    }

    .order-table th,
    .order-table td {
        padding: 8px;
        white-space: nowrap;
    }
}

/* Mobile Portrait */
@media (max-width: 500px) {
    .box {
        width: 100% !important;
    }

    .king-search-field {
        flex: auto;
        width: 100%;
    }

    .king-header {
        padding: 0 12px;
    }

    .header-middle {
        display: none;
    }

    .king-body-in {
        padding: 12px 3% 0 3%;
    }

    .quick-view-btn {
        padding: 10px 18px;
        font-size: 12px;
    }

    .king-body-search h1 {
        font-size: 24px;
    }

    .king-body-search-up {
        min-height: 220px;
    }

    .product-detail-info h1 {
        font-size: 22px;
    }

    .product-detail-info .product-price {
        font-size: 24px;
    }

    .product-detail-actions {
        flex-direction: column;
    }

    .product-detail-actions .add-to-cart-btn {
        width: 100%;
    }

    .cart-summary {
        padding: 16px;
    }

    .king-modal-content {
        margin: 10px;
    }

    .king-modal-form {
        padding: 20px 16px;
    }

    .quickview-modal {
        border-radius: 10px;
        margin: 8px;
    }

    .quickview-image {
        min-height: 200px;
    }

    .quickview-info {
        padding: 16px;
    }

    .king-nav-footer-list {
        grid-template-columns: 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .leo-nav {
        padding: 0 12px;
    }

    .king-search {
        padding: 40px 12px;
    }
}

/* =========================================================
   19. UTILITIES
   ========================================================= */
.hide {
    display: none;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.p-20 {
    padding: 20px;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-20 {
    gap: 20px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    font-size: 13px;
    color: #8a8997;
    align-items: center;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li + li::before {
    content: '/';
    color: #d9dce1;
}

.breadcrumb a {
    color: #646373;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #1DB954;
}

/* Head Title */
.head-title {
    margin-bottom: 20px;
}

.head-title h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    color: #1d1d1f;
}

.head-title h1 i {
    color: #1DB954;
    margin-right: 8px;
}

.head-title p {
    margin-top: 6px;
    font-size: 14px;
    color: #8a8997;
}

.head-title p a {
    color: #1DB954;
}

/* Visually Hidden (accessible) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Selection Color */
::selection {
    background: #1DB954;
    color: #fff;
}

::-moz-selection {
    background: #1DB954;
    color: #fff;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #1DB954;
    outline-offset: 2px;
}

/* Smooth image rendering */
.product-card img,
.product-gallery img {
    image-rendering: -webkit-optimize-contrast;
}

/* Print Styles */
@media print {
    .leftmenu,
    .king-header,
    .king-search,
    .leo-nav,
    .add-to-cart-btn,
    .king-footer {
        display: none !important;
    }

    .king-body {
        padding-left: 0 !important;
    }

    .product-card {
        box-shadow: none;
        border: 1px solid #e7e7e9;
        break-inside: avoid;
    }
}
