/* ═══════════════════════════════════════════════════════════
   SHOP LAYOUT — ProMobile
   resources/css/shop/layout.css
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --bg:               #f9f9fb;
    --surface:          #ffffff;
    --surface-low:      #f3f3f5;
    --surface-high:     #e8e8ea;
    --surface-highest:  #e2e2e4;
    --border:           rgba(0,0,0,0.08);
    --border-solid:     #e2e2e4;
    --text:             #1a1c1d;
    --text-soft:        #414753;
    --text-muted:       #717785;
    --primary:          #0059b5;
    --primary-cont:     #0071e3;
    --primary-fixed:    #d7e2ff;
    --primary-dim:      #abc7ff;
    --secondary:        #5f5e60;
    --error:            #ba1a1a;
    --error-bg:         #ffdad6;
    --success:          #1a7a4a;
    --success-bg:       #d6f5e3;
    --radius-full:      9999px;
    --radius-xl:        1.5rem;
    --radius-2xl:       2rem;
    --radius-3xl:       2.5rem;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-width: 320px;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 300;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(249,249,251,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-solid);
    overflow: visible;
}

.navbar-inner {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    overflow: visible;
    justify-content: space-between;
    gap: 24px;
}

/* ── LOGO ── */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    height: 28px;
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-logo span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 7px 14px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--surface-low); }
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-fixed);
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search { position: relative; }

.nav-search input {
    width: 200px;
    padding: 9px 14px 9px 38px;
    background: var(--surface-low);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-full);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.nav-search input:focus {
    width: 240px;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0,89,181,0.1);
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-search .search-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

/* ── CART BUTTON ── */
.cart-btn {
    position: relative;
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border-solid);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-soft);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.cart-btn:hover {
    background: var(--surface-low);
    border-color: var(--primary);
    color: var(--primary);
}

.cart-count {
    position: absolute;
    top: -5px; right: -5px;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    background: var(--primary-cont);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    color: white;
    border: 2px solid var(--bg);
}

/* ── MAIN ── */
.main-wrap {
    padding-top: 64px;
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}
/* ── FLASH ── */
.flash {
    position: fixed;
    top: 80px; right: 24px;
    z-index: 500;
    padding: 14px 20px;
    border-radius: var(--radius-xl);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease, fadeOut 0.4s ease 3s forwards;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.flash-success {
    background: var(--success-bg);
    border: 1px solid #a3e0be;
    color: var(--success);
}

.flash-error {
    background: var(--error-bg);
    border: 1px solid #ffb4ab;
    color: var(--error);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(30px); }
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-full);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary { background: var(--text); color: var(--surface); }
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-solid);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-fixed); }

.btn-danger { background: var(--error-bg); color: var(--error); border: 1px solid #ffb4ab; }
.btn-danger:hover { opacity: 0.85; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ── PRODUCT GRID ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--surface-low);
    border-radius: var(--radius-3xl);
    padding: 16px;
    transition: background 0.3s;
    cursor: pointer;
}
.product-card:hover { background: var(--surface-high); }

.product-card-img {
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--surface);
    margin-bottom: 16px;
    position: relative;
}
.product-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}
.product-card:hover .product-card-img img { transform: scale(1.07); }

.product-card-body { padding: 0 4px 4px; }

.product-card-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.product-card-name { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.product-card-sub  { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.product-card-price { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; }

.btn-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--text);
    color: var(--surface);
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}
.btn-add-cart:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── BADGE ── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.badge-blue  { background: var(--primary-fixed); color: var(--primary); }
.badge-green { background: var(--success-bg);    color: var(--success); }
.badge-red   { background: var(--error-bg);      color: var(--error); }

/* ── SECTION HELPERS ── */
.section { padding: 48px 24px; max-width: 1300px; margin: 0 auto; }
.section-header {
    display: flex; align-items: flex-end;
    justify-content: space-between; gap: 16px;
    margin-bottom: 32px;
}
.section-title { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.section-sub   { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.section-link  {
    font-size: 14px; font-weight: 600;
    color: var(--primary); text-decoration: none; white-space: nowrap;
}
.section-link:hover { opacity: 0.75; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-solid); border-radius: 4px; }

/* ── FOOTER ── */
footer {
    margin-top: 80px;
    background: var(--surface);
    border-top: 1px solid var(--border-solid);
    padding: 52px 5%;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-brand .logo { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; margin-bottom: 12px; }
.footer-brand .logo span { color: var(--primary); }
.footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.75; max-width: 280px; }

.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-soft); margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--primary); }

.footer-bottom {
    max-width: 1300px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-solid);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* ── CART SIDEBAR ── */
.cs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(4px);
}
.cs-overlay.open { opacity: 1; pointer-events: all; }

.cs-sidebar {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: #fff;
    z-index: 901;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(.4,0,.2,1);
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}
.cs-sidebar.open { transform: translateX(0); }

.cs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.cs-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 17px; font-weight: 800; color: #1d1d1f; letter-spacing: -0.3px;
}
.cs-title i { color: #0071e3; font-size: 16px; }
.cs-count-badge {
    background: #0071e3; color: white;
    font-size: 10px; font-weight: 700;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.cs-close {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid #e8e8e8; background: #f5f5f7;
    color: #6e6e73; font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.cs-close:hover { background: #1d1d1f; color: white; border-color: #1d1d1f; }

.cs-body {
    flex: 1; overflow-y: auto; padding: 8px 0; scrollbar-width: thin;
}
.cs-body::-webkit-scrollbar { width: 4px; }
.cs-body::-webkit-scrollbar-thumb { background: #e2e2e4; border-radius: 4px; }

.cs-items { padding: 8px 0; }

.cs-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 24px; transition: background 0.2s;
}
.cs-item:hover { background: #fafafa; }

.cs-item-img {
    width: 72px; height: 72px; border-radius: 14px;
    overflow: hidden; background: #f5f5f7; flex-shrink: 0;
}
.cs-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cs-item-img-ph {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #ccc; font-size: 24px;
}

.cs-item-info { flex: 1; min-width: 0; }
.cs-item-name {
    font-size: 13px; font-weight: 700; color: #1d1d1f;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}
.cs-item-price { font-size: 14px; font-weight: 800; color: #1d1d1f; margin-bottom: 10px; }
.cs-item-qty {
    display: flex; align-items: center;
    background: #f5f5f7; border-radius: 999px;
    width: fit-content; padding: 3px;
}
.cs-qty-btn {
    width: 26px; height: 26px; border-radius: 50%;
    border: none; background: transparent; color: #1d1d1f;
    font-size: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.cs-qty-btn:hover { background: #e8e8e8; }
.cs-qty-num {
    font-size: 13px; font-weight: 700; color: #1d1d1f;
    min-width: 22px; text-align: center;
}
.cs-item-remove {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: transparent; color: #aeaeb2;
    font-size: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.cs-item-remove:hover { background: #fff0f0; color: #ff3b30; }

.cs-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 60px 24px; text-align: center; height: 100%;
}
.cs-empty-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: #f5f5f7;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #c7c7cc; margin-bottom: 20px;
}
.cs-empty-title { font-size: 16px; font-weight: 700; color: #1d1d1f; margin-bottom: 6px; }
.cs-empty-sub   { font-size: 13px; color: #6e6e73; margin-bottom: 24px; line-height: 1.5; }
.cs-empty-btn {
    padding: 11px 24px; background: #1d1d1f; color: white;
    border-radius: 999px; font-size: 13px; font-weight: 700;
    text-decoration: none; transition: opacity 0.2s;
}
.cs-empty-btn:hover { opacity: 0.8; }

.cs-footer {
    padding: 20px 24px; border-top: 1px solid #f0f0f0;
    flex-shrink: 0; background: #fff;
}
.cs-subtotal {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; font-size: 14px; color: #6e6e73;
}
.cs-subtotal-val { font-size: 20px; font-weight: 800; color: #1d1d1f; }
.cs-shipping {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: #6e6e73; margin-bottom: 16px;
}
.cs-checkout-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 15px; background: #1d1d1f; color: white;
    border-radius: 14px; font-size: 15px; font-weight: 700;
    text-decoration: none; transition: opacity 0.2s, transform 0.2s;
}
.cs-checkout-btn:hover { opacity: 0.85; transform: translateY(-1px); color: white; }

/* ── CART SIDEBAR MOBILE ── */
@media (max-width: 480px) {
    .cs-sidebar {
        width: 100vw;
        border-radius: 20px 20px 0 0;
        top: auto !important;
        bottom: 0 !important;
        height: 85vh !important;
        transform: translateY(100%) !important;
        overflow: hidden;
    }
    .cs-sidebar.open {
        transform: translateY(0) !important;
    }
    .cs-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .cs-footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
        flex-shrink: 0;
    }
}

.bp-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
}
.banner-preview-box { position: relative; overflow: hidden; }
.banner-preview-box::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(10,10,26,0.85) 0%, rgba(10,10,26,0.65) 35%, rgba(10,10,26,0.25) 60%, rgba(10,10,26,0.05) 80%, transparent 100%);
}

/* ── WISHLIST ── */
.pm-wish-btn {
    position: absolute;
    top: 10px; right: 10px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.30);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    color: white;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(.4,0,.2,1);
    z-index: 3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.pm-wish-btn:hover {
    background: rgba(255,255,255,0.30);
    border-color: rgba(255,255,255,0.50);
    transform: scale(1.10);
}
.pm-wish-btn.saved {
    background: #ff3b30;
    border-color: #ff3b30;
    color: white;
    text-shadow: none;
}
.pm-wish-btn.saved:hover {
    background: #e02d22;
    border-color: #e02d22;
    transform: scale(1.10);
}
@keyframes heartPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.40); }
    70%  { transform: scale(0.88); }
    100% { transform: scale(1); }
}
.pm-wish-btn.pop { animation: heartPop 0.32s cubic-bezier(.4,0,.2,1) forwards; }

.pm-wishlist-section {
    padding: 0 5%;
    margin-bottom: 48px;
}

/* ── LIVE SEARCH ── */
#searchDropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 340px;      /* ← SHTO KËtë */
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 9999;
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #1d1d1f;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    min-width: 0;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f5f5f7; }

.search-result-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: #f5f5f7;
    flex-shrink: 0;
    padding: 4px;
}

.search-result-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.search-result-name {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.search-result-price {
    font-size: 13px;
    font-weight: 700;
    color: #006980;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-result-empty {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #6e6e73;
}

.search-result-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: #006980;
    color: white;
    padding: 2px 6px;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 5px;
    position: relative;
    top: -1px;
}

/* ── BOTTOM NAV MOBILE ── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 400;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-solid);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 16px;
    border-radius: 12px;
    transition: color 0.2s;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.bottom-nav-item i {
    font-size: 20px;
    transition: transform 0.2s;
}

.bottom-nav-item.active { color: #00bcd4; }
.bottom-nav-item:active i { transform: scale(0.88); }

.bottom-nav-badge {
    position: absolute;
    top: 2px; right: 10px;
    min-width: 16px; height: 16px;
    background: #ff3b30;
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-logo img { height: 20px; }
    .nav-search input { width: 100px; }
    .nav-search input:focus { width: 120px; }
    .cart-btn { display: none; }
    .main-wrap { padding-bottom: 70px; }
    footer { margin-bottom: 70px; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .section { padding: 32px 16px; }
    .bottom-nav { display: block; }

    #searchDropdown {
        position: fixed;
        top: 64px;
        left: 12px;
        right: 12px;
        border-radius: 16px;
        max-height: 50vh;
        box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    }

    .search-result-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .search-result-item img {
        width: 38px;
        height: 38px;
    }

    .search-result-name { font-size: 12px; }
    .search-result-price { font-size: 12px; }
}

@media (max-width: 600px) {
    .pm-cats-section { padding: 0 4%; margin-bottom: 48px; }
    .pm-cat-card { width: 110px; height: 110px; border-radius: 18px; gap: 8px; }
    .pm-cat-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
    .pm-cat-name { font-size: 12px; }
    .pm-section-title { font-size: 24px; }
}/* Fix zoom background */
html {
    background: var(--bg);
    overflow-x: hidden;
}