/* ═══════════════════════════════════════════════════
   CreaNext Store — Final Premium Build
   ═══════════════════════════════════════════════════ */

:root {
    --sh-bg: #050505;
    --sh-surface: rgba(255,255,255,0.04);
    --sh-surface-2: rgba(255,255,255,0.06);
    --sh-border: rgba(255,255,255,0.08);
    --sh-text: #f5f5f5;
    --sh-text-2: #a3a3a3;
    --sh-text-3: #525252;
    --sh-accent: #a78bfa;
    --sh-accent-2: #38bdf8;
    --sh-pink: #f472b6;
    --sh-amber: #fbbf24;
    --sh-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --sh-radius: 20px;
}

body {
    background: var(--sh-bg);
    color: var(--sh-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ─── Ambient Background ─── */
.sh-ambient {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
}
.sh-ambient::before {
    content: ''; position: absolute;
    top: -200px; left: 50%; transform: translateX(-50%);
    width: 1000px; height: 1000px;
    background: radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 60%);
    filter: blur(80px); animation: ambientPulse 8s ease-in-out infinite alternate;
}
.sh-ambient::after {
    content: ''; position: absolute;
    bottom: -300px; right: -200px;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(56,189,248,0.06) 0%, transparent 60%);
    filter: blur(80px); animation: ambientPulse 10s ease-in-out infinite alternate-reverse;
}
@keyframes ambientPulse {
    0% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* ─── Cart Icon in Nav ─── */
.sh-nav-icons { display: flex; align-items: center; gap: 24px; margin-left: auto; z-index: 100; position: relative; }
.sh-nav-cart {
    position: relative; color: var(--sh-text); font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--sh-surface); border: 1px solid var(--sh-border);
    transition: all 0.3s var(--sh-ease);
}
.sh-nav-cart:hover { background: var(--sh-surface-2); border-color: rgba(255,255,255,0.15); transform: scale(1.05); }
.sh-cart-count {
    position: absolute; top: -4px; right: -6px;
    background: var(--sh-accent); color: #fff;
    font-size: 0.6rem; font-weight: 800; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 100px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(167,139,250,0.5);
}

/* ═════════════════════════════════════════════════
   GATEWAY — The Full-Page Category Chooser
   ═════════════════════════════════════════════════ */
.sh-gateway {
    position: relative; z-index: 10;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 100px 32px 60px;
    text-align: center;
}

.sh-gateway-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; border-radius: 100px;
    background: var(--sh-surface); border: 1px solid var(--sh-border);
    color: var(--sh-accent); font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 28px; backdrop-filter: blur(10px);
}
.sh-gateway-tag i { font-size: 0.7rem; }

.sh-gateway h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800; letter-spacing: -0.04em;
    line-height: 1.15; color: #fff;
    margin-bottom: 16px;
}

.sh-gateway > p {
    font-size: 1.1rem; color: var(--sh-text-2);
    max-width: 520px; line-height: 1.6; margin-bottom: 56px;
}

/* ─── The 3 Cards ─── */
.sh-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%; max-width: 1100px;
}

.sh-card-gate {
    position: relative;
    border-radius: var(--sh-radius);
    padding: 2px; /* space for animated gradient border */
    cursor: pointer;
    transition: transform 0.6s var(--sh-ease), box-shadow 0.6s var(--sh-ease);
}

/* Animated gradient border */
.sh-card-gate::before {
    content: ''; position: absolute; inset: 0;
    border-radius: var(--sh-radius);
    background: conic-gradient(from var(--angle, 0deg), transparent 40%, var(--glow) 50%, transparent 60%);
    opacity: 0; transition: opacity 0.5s var(--sh-ease);
    z-index: 0;
}
.sh-card-gate:hover::before { opacity: 1; }
.sh-card-gate:nth-child(1) { --glow: #a78bfa; }
.sh-card-gate:nth-child(2) { --glow: #fbbf24; }
.sh-card-gate:nth-child(3) { --glow: #38bdf8; }

/* Inner content */
.sh-card-inner {
    position: relative; z-index: 1;
    background: #0a0a0a;
    border: 1px solid var(--sh-border);
    border-radius: calc(var(--sh-radius) - 2px);
    padding: 48px 32px 40px;
    text-align: left;
    min-height: 320px;
    display: flex; flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: border-color 0.5s var(--sh-ease), background 0.5s var(--sh-ease);
}
.sh-card-gate:hover .sh-card-inner {
    border-color: rgba(255,255,255,0.12);
    background: #0d0d0d;
}

/* Glow blob inside the card */
.sh-card-glow {
    position: absolute; width: 300px; height: 300px;
    border-radius: 50%; filter: blur(100px); opacity: 0;
    transition: opacity 0.6s var(--sh-ease); pointer-events: none;
}
.sh-card-gate:hover .sh-card-glow { opacity: 1; }
.sh-card-gate:nth-child(1) .sh-card-glow { background: rgba(167,139,250,0.15); top: -80px; right: -80px; }
.sh-card-gate:nth-child(2) .sh-card-glow { background: rgba(251,191,36,0.12); bottom: -80px; left: -80px; }
.sh-card-gate:nth-child(3) .sh-card-glow { background: rgba(56,189,248,0.12); top: -80px; left: -80px; }

/* Icon */
.sh-card-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 32px;
    transition: all 0.5s var(--sh-ease);
}
.sh-card-gate:nth-child(1) .sh-card-icon { color: #a78bfa; background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.2); }
.sh-card-gate:nth-child(2) .sh-card-icon { color: #fbbf24; background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.2); }
.sh-card-gate:nth-child(3) .sh-card-icon { color: #38bdf8; background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.2); }

.sh-card-gate:hover .sh-card-icon { transform: scale(1.1); }

/* Text */
.sh-card-gate h3 {
    font-size: 1.4rem; font-weight: 700; color: #fff;
    letter-spacing: -0.02em; margin-bottom: 10px;
}
.sh-card-gate .sh-card-desc-txt {
    font-size: 0.95rem; color: var(--sh-text-2); line-height: 1.55; margin-bottom: 28px;
}

/* CTA Arrow */
.sh-card-cta {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; font-weight: 600; color: var(--sh-text-3);
    transition: all 0.4s var(--sh-ease);
}
.sh-card-cta i { transition: transform 0.4s var(--sh-ease); }
.sh-card-gate:hover .sh-card-cta { color: var(--sh-text); }
.sh-card-gate:hover .sh-card-cta i { transform: translateX(6px); }

/* Hover lift */
.sh-card-gate:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* ═════════════════════════════════════════════════
   SHOP CONTENT — Search + Grid (revealed after click)
   ═════════════════════════════════════════════════ */
.sh-shop-content {
    position: relative; z-index: 10;
    padding: 0 24px 120px;
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--sh-ease), transform 0.7s var(--sh-ease);
}
.sh-shop-content.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Back Button */
.sh-back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 12px;
    background: var(--sh-surface); border: 1px solid var(--sh-border);
    color: var(--sh-text-2); font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: all 0.3s var(--sh-ease);
    margin: 40px auto 32px; font-family: inherit;
}
.sh-back-btn:hover { color: #fff; border-color: rgba(255,255,255,0.2); background: var(--sh-surface-2); }
.sh-back-btn i { transition: transform 0.3s; }
.sh-back-btn:hover i { transform: translateX(-4px); }

.sh-content-header {
    max-width: 1248px; margin: 0 auto 40px; padding: 0 0;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}

.sh-content-title {
    font-size: 1.6rem; font-weight: 700; color: #fff; letter-spacing: -0.03em;
}

/* Search */
.sh-search {
    position: relative; width: 100%; max-width: 380px;
}
.sh-search input {
    width: 100%; padding: 14px 16px 14px 46px; border-radius: 14px;
    background: var(--sh-surface); border: 1px solid var(--sh-border);
    color: var(--sh-text); font-size: 0.95rem; font-family: inherit;
    outline: none; transition: all 0.3s var(--sh-ease);
    box-sizing: border-box;
}
.sh-search input:focus {
    border-color: rgba(167,139,250,0.5);
    background: var(--sh-surface-2);
    box-shadow: 0 0 0 3px rgba(167,139,250,0.1);
}
.sh-search input::placeholder { color: var(--sh-text-3); }
.sh-search i {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--sh-text-3); font-size: 0.95rem; transition: color 0.3s;
}
.sh-search input:focus ~ i { color: var(--sh-accent); }

/* ─── Product Grid ─── */
.sh-grid {
    max-width: 1248px; margin: 0 auto; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px;
    position: relative; z-index: 10;
}

/* ─── Product Card ─── */
.sh-card {
    position: relative; border-radius: var(--sh-radius);
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    overflow: hidden; transition: all 0.5s var(--sh-ease);
    display: flex; flex-direction: column;
}
.sh-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.sh-card-img-wrap {
    position: relative; aspect-ratio: 16/10; overflow: hidden; background: #0a0a0a;
}
.sh-card-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.7s var(--sh-ease); opacity: 0.9;
}
.sh-card:hover .sh-card-img { transform: scale(1.06); opacity: 1; }

.sh-card-content { padding: 22px 24px 28px; display: flex; flex-direction: column; flex-grow: 1; }
.sh-card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.sh-card-cat {
    font-size: 0.7rem; font-weight: 700; color: var(--sh-accent); text-transform: uppercase; letter-spacing: 1px;
    background: rgba(167,139,250,0.1); padding: 5px 12px; border-radius: 8px;
}
.sh-card-price { font-size: 1.15rem; font-weight: 700; color: #fff; }
.sh-card-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; color: #fff; line-height: 1.35; }
.sh-card-desc {
    font-size: 0.88rem; color: var(--sh-text-2); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Add to Cart Button */
.sh-add-btn {
    margin: auto 24px 24px 24px;
    padding: 13px 20px; border-radius: 12px;
    background: #fff; color: #000;
    font-size: 0.88rem; font-weight: 700; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    opacity: 0; transform: translateY(10px);
    transition: all 0.4s var(--sh-ease);
    font-family: inherit;
}
.sh-card:hover .sh-add-btn { opacity: 1; transform: translateY(0); }
.sh-add-btn:hover { background: var(--sh-accent); color: #fff; }

/* ═════════════════════════════════════════════════
   SLIDE-OUT CART DRAWER
   ═════════════════════════════════════════════════ */
.sh-cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.4s var(--sh-ease);
}
.sh-cart-overlay.active { opacity: 1; pointer-events: auto; }

.sh-cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px;
    background: #0a0a0a; border-left: 1px solid var(--sh-border);
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
    z-index: 10000; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.5s var(--sh-ease);
}
.sh-cart-drawer.active { transform: translateX(0); }

.sh-cart-header {
    padding: 28px 24px 20px; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--sh-border);
}
.sh-cart-header h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.sh-cart-close {
    background: var(--sh-surface); border: 1px solid var(--sh-border);
    color: var(--sh-text-2); font-size: 1rem; cursor: pointer;
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s var(--sh-ease);
}
.sh-cart-close:hover { color: #fff; border-color: rgba(255,255,255,0.2); transform: rotate(90deg); }

.sh-cart-body { flex: 1; overflow-y: auto; padding: 24px; }
.sh-cart-empty { text-align: center; color: var(--sh-text-3); margin-top: 80px; font-size: 0.95rem; }
.sh-cart-empty i { font-size: 2.5rem; margin-bottom: 16px; display: block; color: var(--sh-text-3); }

.sh-cart-item {
    display: flex; gap: 14px; align-items: center; padding-bottom: 20px; margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sh-cart-item-img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; border: 1px solid var(--sh-border); }
.sh-cart-item-info { flex: 1; }
.sh-cart-item-title { font-size: 0.9rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
.sh-cart-item-price { font-size: 0.9rem; color: var(--sh-accent); font-weight: 700; }
.sh-cart-item-remove {
    background: var(--sh-surface); border: 1px solid var(--sh-border); color: var(--sh-text-3); cursor: pointer;
    font-size: 0.85rem; width: 32px; height: 32px; border-radius: 8px; transition: 0.3s var(--sh-ease);
    display: flex; align-items: center; justify-content: center;
}
.sh-cart-item-remove:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

.sh-cart-footer { padding: 24px; border-top: 1px solid var(--sh-border); }
.sh-cart-total {
    display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 800; margin-bottom: 20px; color: #fff;
}
.sh-checkout-btn {
    width: 100%; padding: 16px; border: none; border-radius: 14px;
    background: #fff; color: #000; font-size: 0.95rem; font-weight: 700;
    cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.3s var(--sh-ease);
}
.sh-checkout-btn:hover { background: var(--sh-accent); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(167,139,250,0.3); }

/* ═════════════════════════════════════════════════
   RESPONSIVE — Tablet
   ═════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sh-cards { gap: 20px; max-width: 700px; }
    .sh-card-inner { min-height: 280px; padding: 36px 28px 32px; }
    .sh-card-gate h3 { font-size: 1.2rem; }
    .sh-card-gate .sh-card-desc-txt { font-size: 0.88rem; }
    .sh-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
}

/* ═════════════════════════════════════════════════
   RESPONSIVE — Small Tablet / Large Phone
   ═════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .sh-cards { grid-template-columns: 1fr; max-width: 500px; }
    .sh-card-inner { min-height: auto; padding: 32px 24px 28px; }
    .sh-content-header { flex-direction: column; align-items: stretch; }
    .sh-search { max-width: 100%; }
    .sh-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
    .sh-back-btn { margin: 24px auto 24px; }
}

/* ═════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ═════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sh-gateway { padding: 90px 16px 32px; min-height: calc(100vh - 60px); }
    .sh-gateway h1 { font-size: 1.6rem; margin-bottom: 8px; }
    .sh-gateway > p { font-size: 0.95rem; margin-bottom: 36px; }
    .sh-gateway-tag { font-size: 0.7rem; padding: 6px 14px; margin-bottom: 20px; }

    .sh-cards { gap: 16px; }
    .sh-card-inner { padding: 28px 20px 24px; }
    .sh-card-icon { width: 48px; height: 48px; font-size: 1.2rem; margin-bottom: 20px; }
    .sh-card-gate h3 { font-size: 1.15rem; }
    .sh-card-gate .sh-card-desc-txt { font-size: 0.85rem; margin-bottom: 20px; }
    .sh-card-cta { font-size: 0.82rem; }

    /* Disable hover transforms on touch */
    .sh-card-gate:hover { transform: none; box-shadow: none; }
    .sh-card-gate:active { transform: scale(0.98); }
    .sh-card-gate::before { display: none; } /* No gradient border animation on mobile */

    .sh-grid { grid-template-columns: 1fr; padding: 0; gap: 16px; }
    .sh-shop-content { padding: 0 16px 80px; }

    /* Always show add-to-cart on mobile (no hover) */
    .sh-add-btn {
        opacity: 1; transform: translateY(0);
        margin: 16px 16px 16px;
        min-height: 48px; /* Touch-friendly */
    }

    .sh-card-content { padding: 16px 18px 20px; }
    .sh-card-title { font-size: 1.05rem; }
    .sh-card-desc { font-size: 0.82rem; }
    .sh-card-price { font-size: 1.05rem; }
    .sh-card-cat { font-size: 0.65rem; padding: 4px 10px; }

    /* Search */
    .sh-search input { padding: 14px 14px 14px 42px; font-size: 0.9rem; border-radius: 12px; }

    /* Cart Drawer */
    .sh-cart-drawer { max-width: 100%; }
    .sh-checkout-btn { min-height: 52px; font-size: 0.95rem; }
    .sh-cart-item-img { width: 60px; height: 60px; border-radius: 10px; }

    /* Content header */
    .sh-content-title { font-size: 1.3rem; }
    .sh-back-btn { font-size: 0.82rem; padding: 10px 16px; margin: 16px auto 20px; }
}

/* ═════════════════════════════════════════════════
   RESPONSIVE — Small Phone
   ═════════════════════════════════════════════════ */
@media (max-width: 420px) {
    .sh-gateway { padding: 80px 12px 24px; }
    .sh-gateway h1 { font-size: 1.4rem; }
    .sh-gateway > p { font-size: 0.88rem; margin-bottom: 28px; }
    .sh-card-inner { padding: 24px 16px 20px; }
    .sh-card-icon { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 12px; margin-bottom: 16px; }
    .sh-card-gate h3 { font-size: 1.05rem; margin-bottom: 6px; }
    .sh-card-gate .sh-card-desc-txt { font-size: 0.8rem; line-height: 1.45; }
    .sh-card-content { padding: 14px 14px 16px; }
    .sh-add-btn { margin: 12px 14px 14px; font-size: 0.82rem; min-height: 44px; border-radius: 10px; }
    .sh-nav-cart { width: 36px; height: 36px; border-radius: 10px; font-size: 1rem; }
    .sh-cart-count { width: 16px; height: 16px; font-size: 0.55rem; }
    .sh-shop-content { padding: 0 12px 60px; }
}

/* ─── Animate the gradient border rotation ─── */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes rotateBorder {
    to { --angle: 360deg; }
}
.sh-card-gate:hover::before {
    animation: rotateBorder 3s linear infinite;
}
