/* Estilos Premium para Floristería Emi (Inspirado en Herbs Barcelona) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --primary-color: #444C44;
    --primary-hover: #353b35;
    --primary-light: #5a625a;
    --accent-color: #F8099C;
    --accent-hover: #d60885;
    --accent-light: #fc8ad4;
    --secondary-accent: #E07AAD;
    --secondary-accent-hover: #c95d91;
    --bg-color: #f5faf5;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-color: #2d2f2d;
    --text-muted: #6b6e6b;
    --border-color: rgba(68, 76, 68, 0.1);
    --shadow-soft: 0 8px 25px -8px rgba(68, 76, 68, 0.08);
    --shadow-medium: 0 12px 35px -5px rgba(68, 76, 68, 0.15);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 250, 245, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
    padding: 0.3rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

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

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    color: var(--primary-color);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.cart-icon-btn:hover {
    background-color: rgba(68, 76, 68, 0.05);
}

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

/* Hero Section */
.hero {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f5faf5 0%, #ebf3eb 100%);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: rgba(212, 165, 116, 0.15);
    color: var(--accent-hover);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    line-height: 1.15;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(68, 76, 68, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(68, 76, 68, 0.4);
}

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

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

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

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

/* Search & Filter Section */
.catalog-controls {
    max-width: 1400px;
    margin: -3rem auto 3rem;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 10;
}

.search-bar {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    font-size: 1.05rem;
    border: 1px solid rgba(68, 76, 68, 0.15);
    background-color: white;
    border-radius: var(--radius-md);
    outline: none;
    color: var(--text-color);
    transition: all 0.3s;
    font-family: var(--font-body);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(68, 76, 68, 0.08);
}

.search-icon {
    position: absolute;
    left: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
    align-items: center;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.category-tag {
    padding: 0.6rem 1.2rem;
    background-color: white;
    border: 1px solid rgba(68, 76, 68, 0.1);
    color: var(--text-muted);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.category-tag:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.category-tag.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(68, 76, 68, 0.15);
}

.sort-select {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(68, 76, 68, 0.1);
    background-color: white;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s;
}

.sort-select:focus {
    border-color: var(--primary-color);
}

/* Products Grid */
.products-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

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

.product-card {
    background-color: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 110%; /* Aspect ratio squareish-tall */
    overflow: hidden;
    background-color: var(--bg-color);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--accent-color);
    color: white;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
}

.product-badge.out-of-stock {
    background-color: var(--primary-light);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-ref {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.2rem;
}

.product-title:hover {
    color: var(--accent-color);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    margin-top: auto;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: white;
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(68, 76, 68, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary-color);
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

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

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background-color: #f7f5f0;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.cart-item-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(44, 76, 56, 0.2);
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.qty-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--bg-color);
}

.cart-totals {
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Product Detail Page */
.product-detail-container {
    max-width: 1200px;
    margin: 3rem auto 6rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.product-detail-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    background-color: #f7f5f0;
}

.product-detail-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-detail-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.8rem;
}

.product-detail-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.8rem;
}

.product-detail-specs {
    margin-bottom: 2rem;
}

.spec-item {
    margin-bottom: 0.8rem;
    display: flex;
    gap: 0.5rem;
}

.spec-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* Form Styles for Checkout */
.checkout-container {
    max-width: 1200px;
    margin: 3rem auto 6rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 4rem;
}

.form-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.form-card h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-textarea, .form-select {
    padding: 0.9rem 1.2rem;
    border: 1px solid rgba(44, 76, 56, 0.15);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s;
    background-color: #faf8f5;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(44, 76, 56, 0.06);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.order-summary-card {
    background-color: #eef1ec;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.order-summary-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(44, 76, 56, 0.1);
    padding-bottom: 0.8rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(44, 76, 56, 0.15);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--accent-light);
    padding: 5rem 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-logo span {
    color: var(--accent-color);
}

.footer-col h4 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #cbd5ce;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #8c9d92;
}

/* Success Screen */
.success-container {
    max-width: 600px;
    margin: 6rem auto;
    padding: 3rem;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.success-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.success-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .product-detail-container, .checkout-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* simple mobile nav override */
    }
    .hero h1 {
        font-size: 2.6rem;
    }
    .catalog-controls {
        margin-top: 1rem;
        padding: 1.5rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
