@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600&family=Outfit:wght@300;400;600&display=swap');

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

:root {
    --color-bg: #fafafa;
    --color-text: #1a1a1a;
    --color-accent: #e27396;
    --color-accent-dark: #c44d7a;
    --color-secondary: #f4c430;
    --font-body: 'Outfit', sans-serif;
    --font-display: 'Barlow Condensed', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: linear-gradient(135deg, rgba(226, 115, 150, 0.1) 0%, rgba(244, 196, 48, 0.1) 100%);
    min-height: 100vh;
    color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Marquee */
.marquee {
    background: var(--color-accent);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.marquee-content {
    display: inline-block;
    animation: scroll 20s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}

header h1 {
    font-size: 2.5rem;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    background: var(--color-text);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    font-family: var(--font-display);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 4px;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--color-accent-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background: var(--color-text);
    color: white;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.product-card p {
    margin: 0 0 1rem 0;
    opacity: 0.7;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-accent-dark);
}

/* --- Total Cart Rebuild --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    backdrop-filter: blur(4px);
}

.cart-overlay.active {
    display: block;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2001;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-overlay.active .cart-sidebar {
    transform: translateX(-450px);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f9f9f9;
    padding-bottom: 1rem;
}

.cart-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #ccc;
    line-height: 1;
    transition: color 0.2s;
}

.close-cart:hover {
    color: var(--primary);
}

#cart-items {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    display: block;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    color: #888;
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    background: #fff9fa;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #fee;
}

.cart-item-controls button {
    background: white;
    border: 1px solid #ffdeeb;
    color: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.remove-item-btn:hover {
    opacity: 1;
}

.cart-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f9f9f9;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    background: #fdf2f5;
    padding: 5px 10px;
    border-radius: 20px;
    width: fit-content;
}

.cart-item-controls button {
    background: white;
    border: 1px solid #ffccdd;
    color: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s;
}

.cart-item-controls button:hover {
    background: var(--primary);
    color: white;
}

.cart-item-controls span {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.cart-empty {
    text-align: center;
    color: #999;
    padding: 2rem;
}

/* Bouquet Builder */
.bouquet-builder-container {
    display: flex;
    gap: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.flower-selection {
    flex: 1;
}

.mini-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.mini-product-card {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-product-card:hover {
    border-color: var(--color-accent);
    transform: scale(1.05);
}

.mini-product-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.mini-product-card span {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.mini-product-card strong {
    color: var(--color-accent-dark);
}

.bouquet-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bouquet-visual {
    height: 300px;
    background: #fff9fa;
    border-radius: 20px;
    margin-top: 1.5rem;
    position: relative;
    border: 2px dashed #ffe0e9;
    overflow: hidden;
}

.bouquet-visual img {
    position: absolute;
    width: 80px;
    height: auto;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bouquet-selection-list {
    margin: 2rem 0;
    flex: 1;
}

.selected-flower {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.selected-flower button {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    margin-left: 10px;
    font-weight: bold;
}

.bouquet-footer {
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
    text-align: right;
}

.bouquet-footer h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.bouquet-footer .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1.05rem;
}

.cart-item-price {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.remove-item-btn {
    color: #ff4d4d;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    padding: 0 5px;
    line-height: 1;
    opacity: 0.4;
    transition: all 0.2s;
}

.remove-item-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.cart-modal {
    box-sizing: border-box;
}

.cart-modal * {
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .bouquet-builder-container {
        flex-direction: column;
    }
}