/* ============================================
   VIBE ROASTERS — STOREFRONT STYLES
   Design system: espresso/sage/cream/gold
   ============================================ */

/* ---- RESET & VARS (inherited from landing) ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --espresso: #1a1210;
    --dark-roast: #2c1e1a;
    --crema: #f5ebe0;
    --warm-cream: #faf6f1;
    --sage: #7a9e7e;
    --sage-light: #a8c5ab;
    --sage-dark: #5a8e5e;
    --gold: #c8a45c;
    --gold-muted: #d4b87a;
    --text-primary: #1a1210;
    --text-secondary: #5c4a42;
    --text-light: #8a7a72;
    --border: rgba(26, 18, 16, 0.08);
    --shadow-sm: 0 1px 3px rgba(26, 18, 16, 0.06);
    --shadow-md: 0 4px 12px rgba(26, 18, 16, 0.08);
    --shadow-lg: 0 8px 24px rgba(26, 18, 16, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--warm-cream);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---- STORE NAV ---- */
.store-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(250, 246, 241, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.store-nav .logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--espresso);
}

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

.store-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.store-nav .nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
}

.store-nav .nav-links a:hover,
.store-nav .nav-links a.active {
    color: var(--espresso);
}

.store-nav .nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--sage);
    border-radius: 1px;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-count {
    background: var(--sage);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -10px;
}

.cart-count:empty,
.cart-count[data-count="0"] { display: none; }

/* ---- PAGE HEADER ---- */
.page-header {
    padding: 7rem 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--sage);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.page-header h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--espresso);
    margin-bottom: 0.75rem;
}

.page-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    font-weight: 300;
    line-height: 1.65;
}

/* ---- PRODUCT GRID ---- */
.products-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ---- PRODUCT CARD ---- */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.product-card-image {
    height: 240px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image .roast-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
}

.product-card-image .cup-icon {
    font-size: 4rem;
    opacity: 0.3;
    filter: grayscale(1) brightness(2);
}

.product-card-image .cup-steam {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.product-card-image .steam-line {
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    animation: steam 2s ease-in-out infinite;
}

.product-card-image .steam-line:nth-child(2) { animation-delay: 0.3s; height: 24px; }
.product-card-image .steam-line:nth-child(3) { animation-delay: 0.6s; height: 20px; }

@keyframes steam {
    0%, 100% { transform: translateY(0) scaleY(1); opacity: 0.2; }
    50% { transform: translateY(-8px) scaleY(1.2); opacity: 0.4; }
}

.product-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.product-card-body h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--espresso);
    letter-spacing: -0.01em;
}

.product-card-body .tagline {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    font-weight: 300;
}

.product-card-body .description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
}

.product-card-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--espresso);
}

.product-weight {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-left: 0.5rem;
    font-weight: 400;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--sage);
    color: white;
}

.btn-primary:hover {
    background: var(--sage-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(122, 158, 126, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--sage);
    border: 1.5px solid var(--sage);
}

.btn-secondary:hover {
    background: rgba(122, 158, 126, 0.08);
}

.btn-dark {
    background: var(--espresso);
    color: var(--crema);
}

.btn-dark:hover {
    background: var(--dark-roast);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 18, 16, 0.2);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-added {
    background: var(--espresso) !important;
    color: var(--crema) !important;
    pointer-events: none;
}

/* ---- PRODUCT DETAIL ---- */
.product-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.product-detail-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    position: sticky;
    top: 6rem;
}

.product-detail-image .cup-icon {
    font-size: 8rem;
    opacity: 0.25;
    filter: grayscale(1) brightness(2);
}

.product-detail-image .cup-steam {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.product-detail-image .steam-line {
    width: 3px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    animation: steam 2.5s ease-in-out infinite;
}

.product-detail-image .steam-line:nth-child(2) { animation-delay: 0.4s; height: 40px; }
.product-detail-image .steam-line:nth-child(3) { animation-delay: 0.8s; height: 35px; }

.product-detail-info {
    padding-top: 1rem;
}

.product-detail-info .roast-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    background: rgba(122, 158, 126, 0.12);
    color: var(--sage);
    margin-bottom: 1rem;
}

.product-detail-info h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--espresso);
    margin-bottom: 0.5rem;
}

.product-detail-info .tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.product-detail-price {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--espresso);
    margin-bottom: 0.25rem;
}

.product-detail-weight {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.product-detail-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 2rem;
}

.product-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(122, 158, 126, 0.05);
    border-radius: var(--radius-md);
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.product-meta-row .meta-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.product-meta-row .meta-label {
    color: var(--text-light);
    min-width: 80px;
}

.product-meta-row .meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

.flavor-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.flavor-note {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    background: rgba(122, 158, 126, 0.1);
    color: var(--sage);
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-actions .btn {
    flex: 1;
}

/* Related Products */
.related-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

.related-section h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--espresso);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* ---- CART PAGE ---- */
.cart-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 7rem 2rem 6rem;
}

.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.cart-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.cart-empty h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--espresso);
    margin-bottom: 0.75rem;
}

.cart-empty p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 3rem;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0.3;
}

.cart-item-info h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--espresso);
    margin-bottom: 0.25rem;
}

.cart-item-info .item-roast {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.cart-item-info .item-price {
    font-weight: 600;
    color: var(--text-primary);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    overflow: hidden;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: background var(--transition);
}

.quantity-btn:hover { background: var(--crema); }

.quantity-value {
    width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.remove-btn {
    font-size: 0.75rem;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color var(--transition);
}

.remove-btn:hover { color: #c0392b; }

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 6rem;
}

.cart-summary h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--espresso);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.summary-row .label { color: var(--text-secondary); }
.summary-row .value { font-weight: 600; color: var(--text-primary); }

.summary-total {
    border-top: 2px solid var(--espresso);
    margin-top: 1rem;
    padding-top: 1rem;
}

.summary-total .label {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--espresso);
}

.summary-total .value {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--espresso);
}

.cart-summary .btn {
    width: 100%;
    margin-top: 1.5rem;
}

.cart-summary .shipping-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* ---- TOAST / NOTIFICATION ---- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--espresso);
    color: var(--crema);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast .toast-icon { font-size: 1.1rem; }

/* ---- STORE FOOTER ---- */
.store-footer {
    padding: 3rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    max-width: 1200px;
    margin: 0 auto;
}

.store-footer .footer-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--espresso);
}

.store-footer .footer-links {
    display: flex;
    gap: 2rem;
}

.store-footer .footer-links a {
    font-size: 0.85rem;
    color: var(--text-light);
    transition: color var(--transition);
}

.store-footer .footer-links a:hover { color: var(--text-primary); }

.store-footer .footer-right {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ---- LOADING STATE ---- */
.loading-skeleton {
    background: linear-gradient(90deg, var(--crema) 25%, rgba(245, 235, 224, 0.5) 50%, var(--crema) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- CHECKOUT ITEMS ---- */
.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.checkout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(122, 158, 126, 0.05);
    border-radius: var(--radius-sm);
}

.checkout-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkout-item-info .item-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.checkout-item-info .item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.checkout-item-info .item-qty {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .store-nav { padding: 0.9rem 1.25rem; }
    .store-nav .nav-links { gap: 1.25rem; }
    .store-nav .nav-links a { font-size: 0.8rem; }

    .page-header { padding: 6rem 1.5rem 2rem; }

    .products-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 4rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 6rem 1.5rem 3rem;
    }

    .product-detail-image {
        height: 320px;
        position: static;
    }

    .product-actions {
        flex-direction: column;
    }

    .cart-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .cart-summary { position: static; }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .store-footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .store-footer .footer-links { gap: 1.25rem; }

    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

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