@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700;800&family=Source+Code+Pro:wght@700&display=swap');

:root {
    --color-purple: #6255ae;
    --color-purple-dark: #4e429a;
    --color-purple-light: #f0eeff;
    --color-orange: #ff6d34;
    --color-orange-dark: #e85a20;
    --color-text: #1e1f1e;
    --color-white: #fff;
    --color-gray-100: #f7f7f8;
    --color-gray-200: rgba(30,31,30,0.12);
    --color-gray-400: #6b6b6b;
    --color-success: #27ae60;
    --color-error: #eb5757;
    --transition: 0.2s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-white);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
.header {
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-family: 'Source Code Pro', monospace;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-purple);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 400;
    font-size: 14px;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 2px;
    width: 100%;
    background: var(--color-orange);
    opacity: 0;
    transition: opacity var(--transition);
}

.nav-link:hover {
    color: var(--color-orange);
}

.nav-link:hover::after {
    opacity: 1;
}

.cart-link {
    position: relative;
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-orange);
    color: var(--color-white);
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    min-width: 16px;
    height: 16px;
    border-radius: 0;
    margin-left: 6px;
}

.cart-badge:empty {
    display: none;
}

/* HERO BANNER */
.hero-banner {
    background: var(--color-purple);
    color: var(--color-white);
    padding: 72px 0;
    margin-bottom: 64px;
}

.hero-banner h1 {
    font-family: 'Source Code Pro', monospace;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 600px;
}

.hero-banner p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 32px;
    max-width: 500px;
}

/* MAIN CONTENT */
main {
    padding-bottom: 80px;
}

.page-section {
    padding-top: 48px;
}

.page-title {
    font-family: 'Source Code Pro', monospace;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--color-text);
}

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

.product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-gray-200);
    transition: box-shadow var(--transition), border-color var(--transition);
}

.product-card:hover {
    box-shadow: 0 8px 32px rgba(98, 85, 174, 0.15);
    border-color: var(--color-purple);
}

.product-card .image-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--color-gray-100);
    aspect-ratio: 3/4;
    margin-bottom: 0;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card .product-info {
    padding: 20px;
    position: static;
}

.product-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text);
}

.price {
    font-weight: 500;
    color: var(--color-purple);
    margin-bottom: 16px;
    font-size: 15px;
}

/* BUTTONS */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    min-height: 48px;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Prompt', sans-serif;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    width: 100%;
    letter-spacing: 0.01em;
}

.button-primary {
    background: var(--color-purple);
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(98, 85, 174, 0.3);
}

.button-primary:hover:not(:disabled) {
    background: var(--color-purple-dark);
    box-shadow: 0 6px 20px rgba(98, 85, 174, 0.45);
}

.button-primary:active:not(:disabled) {
    background: var(--color-purple-dark);
    box-shadow: none;
}

.button-accent {
    background: var(--color-orange);
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(255, 109, 52, 0.3);
}

.button-accent:hover:not(:disabled) {
    background: var(--color-orange-dark);
    box-shadow: 0 6px 20px rgba(255, 109, 52, 0.45);
}

.button-secondary {
    background: var(--color-white);
    border-color: var(--color-gray-200);
    color: var(--color-text);
}

.button-secondary:hover:not(:disabled) {
    background: var(--color-purple-light);
    border-color: var(--color-purple);
    color: var(--color-purple);
}

.button-add-more {
    background: var(--color-purple-light);
    border: 1px solid var(--color-purple);
    color: var(--color-purple);
    width: 28px;
    height: 28px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 700;
    margin-left: 8px;
    line-height: 1;
    transition: background var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button-add-more:hover {
    background: var(--color-purple);
    color: var(--color-white);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button.loading {
    color: transparent;
    position: relative;
}

.button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.button-secondary.loading::after {
    border: 2px solid rgba(98, 85, 174, 0.2);
    border-top-color: var(--color-purple);
}

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

.button.success {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #fff;
    box-shadow: none;
}

/* PRODUCT PAGE */
.product-page {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: start;
    padding-top: 48px;
}

.product-page .image-wrapper {
    background: var(--color-gray-100);
    aspect-ratio: 3/4;
    border: 1px solid var(--color-gray-200);
}

.product-page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    position: sticky;
    top: 120px;
}

.product-page h2 {
    font-family: 'Source Code Pro', monospace;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.product-page .price {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-purple);
    margin-bottom: 32px;
}

/* CART */
.cart-items {
    margin-bottom: 48px;
}

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

.cart-item img {
    width: 100px;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
}

.cart-item-details h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-details p {
    font-size: 14px;
    color: var(--color-gray-400);
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-purple);
}

.cart-summary {
    background: var(--color-purple-light);
    border: 1px solid rgba(98, 85, 174, 0.2);
    padding: 32px;
    border-radius: 0;
    max-width: 400px;
    margin-left: auto;
}

.cart-summary h3 {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--color-text);
}

.cart-empty {
    text-align: center;
    padding: 80px 0;
}

.cart-empty p {
    font-size: 18px;
    color: var(--color-gray-400);
    margin-bottom: 24px;
}

.cart-empty .button {
    width: auto;
}

/* MESSAGES */
.message {
    padding: 16px 20px;
    border-radius: 0;
    margin-bottom: 24px;
    font-size: 14px;
    border-left: 4px solid;
}

.message-success {
    background: #e6fffa;
    color: #234e52;
    border-color: var(--color-success);
}

.message-error {
    background: #fff5f5;
    color: #9b2c2c;
    border-color: var(--color-error);
}

/* FEEDBACK TEXT */
.feedback-text {
    display: block;
    font-size: 12px;
    margin-top: 8px;
    color: var(--color-success);
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition);
}

.feedback-text.show {
    opacity: 1;
}

/* UTILITIES */
.button-inline {
    margin-top: 24px;
    width: auto;
}

.sticky-block {
    position: sticky;
    top: 120px;
}

.empty-state {
    text-align: center;
    padding: 80px 0;
}

.empty-state p {
    font-size: 18px;
    color: var(--color-gray-400);
    margin-bottom: 24px;
}

/* FOOTER BANNER */
.footer-banner {
    background: var(--color-purple);
    color: var(--color-white);
    padding: 48px 0;
    margin-top: 80px;
    text-align: center;
}

.footer-banner p {
    font-size: 16px;
    opacity: 0.8;
}

.footer-banner strong {
    display: block;
    font-family: 'Source Code Pro', monospace;
    font-size: 24px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .hero-banner h1 {
        font-size: 32px;
    }

    .product-page {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 32px;
    }

    .product-info {
        position: static;
    }
}