@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #FAFAFC;
    --surface: #ffffff;
    --surface-soft: #f4f5f7;
    --text: #374151;
    --muted: #6b7280;
    --line: #e5e7eb;
    --accent: #ec4899; /* Chic Pink */
    --accent-dark: #be185d;
    --accent-soft: #fdf2f8;
    --ink: #111827;
    --mint: #d1fae5;
    --lavender: #ede9fe;
    --peach: #ffedd5;
    --warning: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 8px 20px -6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 25px 50px -12px rgba(99, 102, 241, 0.25);
    --radius: 16px;
    --radius-sm: 8px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--ink);
    margin-top: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav a { color: var(--text); text-decoration: none; font-weight: 500; transition: color 0.2s ease; }
.nav a:hover, .nav a.active { color: var(--accent); }

/* Sidebar Admin Layout */
.admin-body { background: #f8fafc; }
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--line);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 1px 0 10px rgba(0,0,0,0.02);
}
.admin-sidebar .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}
.admin-sidebar .nav a {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 0.95rem;
}
.admin-sidebar .nav a:hover {
    background: #f1f5f9;
}
.admin-sidebar .nav a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.admin-main {
    flex: 1;
    padding: 48px;
    max-width: 1200px;
}
.admin-sidebar .view-store-btn {
    background: #111827;
    color: white !important;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-top: auto; /* Push to bottom */
}
.admin-sidebar .view-store-btn:hover { background: #1f2937; }

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

button, .checkout-link {
    align-items: center;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

button:hover, .checkout-link:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

button:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

input, select, textarea {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    min-height: 48px;
    padding: 12px 16px;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
}

input:focus, select:focus, textarea:focus {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02), 0 0 0 4px var(--accent-soft);
    outline: 0;
}

[dir="rtl"] body, [dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea { text-align: right; }
[dir="ltr"] body, [dir="ltr"] input, [dir="ltr"] select, [dir="ltr"] textarea { text-align: left; }

.site-header {
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    display: flex;
    justify-content: space-between;
    padding: 16px clamp(24px, 5vw, 64px);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px -10px rgba(0, 0, 0, 0.05);
}

.brand {
    font-family: var(--font-heading);
    color: var(--ink);
    font-size: 1.6rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.03em;
}

.brand::before {
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 10px;
    content: "";
    display: inline-block;
    height: 32px;
    width: 32px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.nav a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.nav a:hover {
    color: var(--accent);
    background: var(--surface-soft);
}

.nav span {
    background: var(--accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.75rem;
    justify-content: center;
    min-width: 24px;
    padding: 2px 8px;
    margin-left: 6px;
    font-weight: 800;
}

.header-search { flex: 1; margin: 0 40px; max-width: 500px; position: relative; }
.header-search input {
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid transparent;
    padding-inline: 24px;
}
.header-search input:focus { background: var(--surface); border-color: var(--accent); }

main { margin: 0 auto; max-width: 1280px; padding: 48px clamp(24px, 5vw, 64px) 80px; }

.hero {
    align-items: center;
    background-color: var(--ink);
    background-image: linear-gradient(to right, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.4)), url('hero_bg.png');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    color: #fff;
    display: flex;
    min-height: 400px;
    padding: 60px 48px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero > div {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1.15rem;
    margin-bottom: 32px;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: inline-block;
}

.toolbar { margin: 32px 0 24px; }

.filters {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 240px auto;
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.category-strip { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 32px; }

.category-strip a {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    padding: 10px 20px;
    box-shadow: var(--shadow-soft);
}

.category-strip a:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.product-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.product-card {
    background: var(--surface);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.product-image {
    aspect-ratio: 4 / 3;
    background-color: var(--surface-soft);
    background-position: center;
    background-size: cover;
    display: block;
    position: relative;
    overflow: hidden;
}

.product-image::after {
    background: rgba(17, 24, 39, 0.1);
    content: "";
    inset: 0;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image::after { opacity: 1; }

.product-image em {
    align-items: center;
    background: var(--surface);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 800;
    min-height: 40px;
    padding: 0 20px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: var(--shadow-soft);
}

.product-card:hover .product-image em {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 768px) {
    .site-header { padding: 16px; }
    .site-footer { flex-direction: column; text-align: center; gap: 24px; padding: 40px 24px; }
    .footer-links { justify-content: center; width: 100%; flex-wrap: wrap; gap: 16px; }
    .cart-summary { order: -1; margin-bottom: 32px; position: static; }
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
.form-group-full {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.product-info { padding: 24px; display: flex; flex-direction: column; flex: 1; }

.category {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.product-info h2 { font-size: 1.25rem; margin-bottom: 12px; }

.product-info .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }

.product-info p { color: var(--text); font-size: 0.95rem; margin-bottom: 24px; line-height: 1.5; }

.card-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.card-footer strong, .price {
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
}

.old-price {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-detail {
    display: grid;
    gap: 48px;
    grid-template-columns: 1fr 1fr;
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.detail-image {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    background-color: var(--surface-soft);
    background-position: center;
    background-size: cover;
}

.detail-copy h1 { font-size: 2.5rem; margin-bottom: 16px; }

.detail-copy .price { font-size: 2rem; margin: 24px 0; color: var(--accent); }

.buy-box {
    display: grid;
    gap: 16px;
    background: var(--surface-soft);
    padding: 24px;
    border-radius: var(--radius-sm);
    margin-top: 32px;
}

.feature-strip {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
    margin: 64px 0;
}

.feature-strip article {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.2s ease;
}

.feature-strip article:hover { transform: translateY(-4px); }

.feature-strip strong { display: block; font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 8px; color: var(--ink); }

.cart-layout, .account-layout {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr 380px;
    align-items: start;
}

.cart-items, .summary, .checkout-form, .admin-form {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.cart-row {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr 100px 120px auto;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.cart-row:last-child { border-bottom: none; padding-bottom: 0; }

.summary { position: sticky; top: 120px; }

.summary h2, .checkout-form h2, .admin-form h1, .admin-form h2 { margin-bottom: 24px; }

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.summary-line.total {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
    border-top: 2px solid var(--line);
}

.checkout-form label, .admin-form label {
    display: block;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
}

.checkout-form input, .checkout-form select, .checkout-form textarea,
.admin-form input, .admin-form select, .admin-form textarea {
    margin-top: 8px;
}

.checkout-form button, .admin-form button {
    width: 100%;
    margin-top: 12px;
}

.site-footer {
    border-top: 1px solid rgba(229, 231, 235, 0.5);
    padding: 64px clamp(24px, 5vw, 64px);
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    background: var(--surface);
}

.notice {
    background: var(--accent-soft);
    color: var(--accent-dark);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Admin Specific */
.admin-layout {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr 380px;
}

.admin-table {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.admin-table-head, .admin-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 16px 24px;
    align-items: center;
}

.admin-table-head {
    background: var(--surface-soft);
    font-weight: 800;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.admin-table-row {
    border-bottom: 1px solid var(--line);
}

.admin-table-row:last-child { border-bottom: none; }

.admin-actions a {
    color: var(--accent);
    font-weight: 600;
    margin-right: 12px;
}

.page-heading { text-align: center; margin-bottom: 48px; max-width: 600px; margin-inline: auto; }
.page-heading h1 { font-size: 3rem; margin-bottom: 16px; }

.contact-page { max-width: 800px; margin: 0 auto; }
.contact-page .checkout-form { margin: 0 auto; }

@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout, .account-layout, .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .product-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .feature-strip { grid-template-columns: 1fr; }
    .cart-row { grid-template-columns: 1fr; gap: 12px; }
}
