/* ══════════════════════════════════════════
   CSK Restaurant Menu — Stylesheet v3.3.0
   Covai Sri Kongunaad
   Upload to: /wp-content/plugins/csk-restaurant/csk-menu.css
══════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    overflow-x: hidden;
    max-width: 100%;
    background: #050507;
    color: #F5F2E9;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* ── GLOBAL OVERFLOW GUARD ── */
.csk-nav,
.csk-controls,
.csk-products-wrap,
.csk-hero,
.csk-footer {
    max-width: 100%;
    overflow-x: hidden;
}
.csk-card {
    min-width: 0;
    max-width: 100%;
}
.csk-card-body {
    min-width: 0;
    overflow: hidden;
}
.csk-card-name,
.csk-card-desc {
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* ══ NAV ══ */
.csk-nav {
    background: #050507;
    border-bottom: 1px solid rgba(212,175,55,0.18);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
}
.csk-nav-logo img {
    height: 42px;
    width: auto;
    display: block;
}
.csk-nav-links {
    display: flex;
    gap: 32px;
}
.csk-nav-links a {
    color: rgba(245,242,233,0.6);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.2s;
}
.csk-nav-links a:hover,
.csk-nav-links a.active {
    color: #D4AF37;
}

/* Cart button */
.csk-cart-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #F5F2E9;
    border: 1px solid rgba(212,175,55,0.3);
    padding: 8px 16px 8px 12px;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}
.csk-cart-btn:hover {
    border-color: #D4AF37;
    background: rgba(212,175,55,0.06);
}
.csk-cart-btn svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #D4AF37;
    stroke-width: 1.8;
    flex-shrink: 0;
}
.csk-cart-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.csk-cart-text-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(245,242,233,0.5);
    line-height: 1;
    font-weight: 500;
}
.csk-cart-text-count {
    font-size: 13px;
    font-weight: 600;
    color: #D4AF37;
    line-height: 1.2;
}
.csk-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #D4AF37;
    color: #050507;
    font-size: 10px;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 0 0 2px #050507;
}

/* ══ TOAST ══ */
.csk-toast {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    background: #0D2B1A;
    border: 1px solid #1E6B3C;
    border-left: 3px solid #2ECC71;
    padding: 14px 18px 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 320px;
    width: calc(100% - 48px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.csk-toast.show {
    transform: translateX(0);
}
.csk-toast-icon {
    width: 32px;
    height: 32px;
    background: rgba(46,204,113,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.csk-toast-icon svg {
    width: 16px;
    height: 16px;
    stroke: #2ECC71;
    fill: none;
    stroke-width: 2.5;
}
.csk-toast-body {
    flex: 1;
    min-width: 0;
}
.csk-toast-title {
    font-size: 13px;
    font-weight: 600;
    color: #F5F2E9;
    margin-bottom: 3px;
}
.csk-toast-sub {
    font-size: 11.5px;
    color: rgba(245,242,233,0.45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.csk-toast-close {
    background: none;
    border: none;
    color: rgba(245,242,233,0.3);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}
.csk-toast-close:hover {
    color: rgba(245,242,233,0.8);
}
.csk-toast-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #2ECC71;
    width: 100%;
    transform-origin: left;
}
.csk-toast.show .csk-toast-bar {
    animation: cskProg 4s linear forwards;
}
@keyframes cskProg {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ══ HERO ══ */
.csk-hero {
    text-align: center;
    padding: 52px 20px 36px;
    border-bottom: 1px solid rgba(212,175,55,0.08);
}
.csk-hero-label {
    color: #D4AF37;
    letter-spacing: 5px;
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.csk-hero h1 {
    font-family: 'Playfair Display', serif;
    color: #D4AF37;
    font-size: clamp(30px, 5vw, 56px);
    margin-bottom: 14px;
}
.csk-hero p {
    color: rgba(245,242,233,0.5);
    font-size: 14px;
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.7;
}
.csk-divider {
    width: 48px;
    height: 1px;
    background: rgba(212,175,55,0.45);
    margin: 18px auto 0;
}

/* ══ CONTROLS ══ */
.csk-controls {
    max-width: 1300px;
    margin: 28px auto 0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.csk-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.csk-search-wrap svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    stroke: rgba(212,175,55,0.5);
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}
.csk-search {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,175,55,0.22);
    color: #F5F2E9;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 11px 14px 11px 40px;
    outline: none;
    transition: border-color 0.2s;
}
.csk-search::placeholder {
    color: rgba(245,242,233,0.28);
}
.csk-search:focus {
    border-color: rgba(212,175,55,0.6);
    background: rgba(255,255,255,0.05);
}
.csk-filter-wrap {
    position: relative;
    flex-shrink: 0;
}
.csk-filter-wrap svg {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    stroke: rgba(212,175,55,0.6);
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}
.csk-filter {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,175,55,0.22);
    color: #D4AF37;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 11px 40px 11px 16px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    min-width: 200px;
    transition: border-color 0.2s;
}
.csk-filter:focus {
    border-color: rgba(212,175,55,0.6);
}
option {
    background: #111;
    color: #F5F2E9;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}
.csk-result-count {
    margin-left: auto;
    font-size: 11px;
    color: rgba(245,242,233,0.3);
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ══ PRODUCTS WRAPPER ══ */
.csk-products-wrap {
    max-width: 1300px;
    margin: 24px auto 60px;
    padding: 0 24px;
}

/* Category heading */
.csk-cat-heading {
    font-family: 'Playfair Display', serif;
    color: #D4AF37;
    font-size: 21px;
    margin: 36px 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212,175,55,0.12);
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.csk-cat-heading span {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: rgba(212,175,55,0.45);
    font-weight: 400;
    letter-spacing: 1px;
}

/* Grid */
.csk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 8px;
}

/* ══ CARD ══ */
.csk-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(212,175,55,0.12);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
    min-width: 0;
}
.csk-card:hover {
    border-color: rgba(212,175,55,0.4);
    background: rgba(255,255,255,0.05);
}

/* Image panel */
.csk-card-img {
    width: 88px;
    min-width: 88px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    background: #0e0e12;
    align-self: stretch;
    display: flex;
}
.csk-card-img img {
    width: 88px;
    height: 100%;
    min-height: 88px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}
.csk-card-img-placeholder {
    width: 88px;
    min-width: 88px;
    min-height: 88px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0e0e12 0%, #1a1508 100%);
    border-right: 1px solid rgba(212,175,55,0.1);
    flex-shrink: 0;
}
.csk-card-img-placeholder span {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: rgba(212,175,55,0.3);
    line-height: 1;
    user-select: none;
}

/* Card body */
.csk-card-body {
    flex: 1;
    min-width: 0;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}
.csk-card-info {
    flex: 1;
    min-width: 0;
}
.csk-card-name {
    color: #F5F2E9;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}
.csk-card-desc {
    color: rgba(245,242,233,0.38);
    font-size: 11px;
    margin-bottom: 7px;
    line-height: 1.5;
    overflow: hidden;
    word-break: break-word;
}
.csk-card-price {
    color: #D4AF37;
    font-size: 14px;
    font-weight: 700;
}

/* Add button */
.csk-add-btn {
    flex-shrink: 0;
    background: #145A32;
    color: #F5F2E9;
    border: 1px solid #145A32;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    display: inline-block;
    align-self: center;
}
.csk-add-btn:hover {
    background: #D4AF37;
    color: #050507;
    border-color: #D4AF37;
}
.csk-sold-out {
    color: rgba(245,242,233,0.22);
    font-size: 11px;
    flex-shrink: 0;
}

/* No results */
.csk-no-results {
    text-align: center;
    padding: 70px 20px;
    color: rgba(245,242,233,0.2);
    font-size: 15px;
    display: none;
}
.csk-no-results.visible {
    display: block;
}

/* ══ FOOTER ══ */
.csk-footer {
    border-top: 1px solid rgba(212,175,55,0.08);
    padding: 26px 40px;
    text-align: center;
    color: rgba(245,242,233,0.22);
    font-size: 11px;
    letter-spacing: 1.5px;
}

/* ══════════════════════════
   TABLET — max-width: 1024px
══════════════════════════ */
@media (max-width: 1024px) {
    .csk-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* ══════════════════════════
   MOBILE — max-width: 768px
══════════════════════════ */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }

    /* Nav */
    .csk-nav { padding: 0 16px; height: 62px; }
    .csk-nav-logo img { height: 34px; }
    .csk-nav-links { display: none; }
    .csk-cart-btn { padding: 7px 12px 7px 10px; gap: 8px; }
    .csk-cart-text-label { display: none; }
    .csk-cart-text-count { font-size: 12px; }

    /* Hero */
    .csk-hero { padding: 32px 16px 24px; }
    .csk-hero h1 { font-size: 30px; }
    .csk-hero p { font-size: 13px; }

    /* Controls */
    .csk-controls {
        padding: 0 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 20px;
    }
    .csk-search-wrap { min-width: unset; width: 100%; }
    .csk-filter-wrap { width: 100%; }
    .csk-filter { min-width: 100%; width: 100%; }
    .csk-result-count { margin-left: 0; text-align: right; }

    /* Products */
    .csk-products-wrap { padding: 0 16px; }
    .csk-cat-heading { font-size: 18px; margin: 28px 0 10px; }

    /* Grid — single column */
    .csk-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    /* Card */
    .csk-card { width: 100%; }
    .csk-card-img {
        width: 76px;
        min-width: 76px;
        height: auto;
        min-height: 76px;
    }
    .csk-card-img img {
        width: 76px;
        min-height: 76px;
    }
    .csk-card-img-placeholder {
        width: 76px;
        min-width: 76px;
        min-height: 76px;
    }
    .csk-card-img-placeholder span { font-size: 22px; }
    .csk-card-body { padding: 12px; gap: 10px; }
    .csk-card-name { font-size: 12.5px; }
    .csk-card-desc { font-size: 10.5px; margin-bottom: 5px; }
    .csk-card-price { font-size: 13px; }
    .csk-add-btn { padding: 8px 12px; font-size: 11.5px; }

    /* Toast */
    .csk-toast {
        top: 70px;
        right: 12px;
        left: 12px;
        max-width: unset;
        width: calc(100% - 24px);
    }

    /* Footer */
    .csk-footer { padding: 22px 16px; }
}

/* ══════════════════════════
   SMALL PHONES — max-width: 380px
══════════════════════════ */
@media (max-width: 380px) {
    .csk-card-img { width: 64px; min-width: 64px; }
    .csk-card-img img { width: 64px; }
    .csk-card-img-placeholder { width: 64px; min-width: 64px; }
    .csk-card-img-placeholder span { font-size: 18px; }
    .csk-card-body { padding: 10px; gap: 8px; }
    .csk-add-btn { padding: 7px 10px; font-size: 11px; }
}