/* ============================================
   Dolce Cucina - Patisserie Theme
   ============================================ */

:root {
    --color-bg: #fdfbf9;
    --color-text: #2c2c2c;
    --color-text-light: #666;
    --color-accent: #c9a87c;
    --color-accent-dark: #a88a5c;
    --color-border: #e8e4df;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --spacing: 1.5rem;
    --max-width: 1400px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-weight: 300;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header */
.site-header {
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.site-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo {
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.1em;
}

.tagline {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0.5rem 0 0;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.main-nav {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--color-accent-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--color-accent);
    color: white;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.instagram-link:hover {
    color: var(--color-accent-dark);
}

/* Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.gallery-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.gallery-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay time {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* No Posts Message */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
}

.no-posts p {
    margin: 0.5rem 0;
}

/* Single Post */
.post-single {
    padding: 2rem 0 4rem;
}

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

.post-header time {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--color-text-light);
}

.view-on-instagram {
    font-size: 0.875rem;
    color: var(--color-accent-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.view-on-instagram:hover {
    color: var(--color-text);
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-content img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.post-content p {
    font-size: 1rem;
    line-height: 1.8;
    margin: 1rem 0;
    white-space: pre-wrap;
}

.post-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.tag {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.post-navigation a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.post-navigation a:hover {
    color: var(--color-accent-dark);
}

.nav-home {
    font-weight: 500;
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    margin-top: 2rem;
}

.site-footer p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.site-footer a {
    color: var(--color-accent-dark);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.75rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .post-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .post-navigation {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
}

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

/* ============================================
   Shop Styles
   ============================================ */

.shop-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.shop-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 0 0 1rem;
}

.shop-intro {
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

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

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-border);
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, #f5f0eb 0%, #e8e0d8 100%);
}

.product-info {
    padding: 1.25rem;
}

.product-info h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}

.product-description {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-accent-dark);
    margin: 0 0 1rem;
}

.product-actions {
    display: flex;
    justify-content: center;
}

.btn-add {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-add:hover {
    background: var(--color-accent-dark);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--color-border);
    border-radius: 4px;
    padding: 0.25rem;
}

.btn-qty {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    border-radius: 4px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

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

.quantity {
    font-weight: 500;
    min-width: 2rem;
    text-align: center;
}

/* Cart Summary */
.cart-summary {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-accent);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 100;
    font-size: 0.9rem;
}

.cart-summary.hidden {
    display: none;
}

.cart-icon {
    font-size: 1.25rem;
}

.cart-count {
    background: white;
    color: var(--color-accent-dark);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
}

.cart-total-mini {
    font-weight: 500;
}

.btn-view-cart {
    background: white;
    color: var(--color-accent-dark);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-view-cart:hover {
    background: #f0f0f0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 0.25rem 0.5rem;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin: 0 0 1.5rem;
    text-align: center;
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
    gap: 1rem;
}

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

.cart-item-name {
    display: block;
    font-weight: 500;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

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

.cart-item-controls .btn-qty {
    width: 28px;
    height: 28px;
    font-size: 1rem;
}

.cart-item-controls .quantity {
    min-width: 1.5rem;
}

.cart-item-subtotal {
    font-weight: 500;
    min-width: 70px;
    text-align: right;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.empty-cart {
    text-align: center;
    color: var(--color-text-light);
    padding: 2rem;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-accent-dark);
}

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

/* Checkout Form */
.checkout-form {
    max-width: 550px;
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    font-weight: 600;
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem;
}

.payment-note {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f8f6f4;
    border-radius: 6px;
}

/* Success Modal */
.success-content {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.success-content h2 {
    color: #4caf50;
}

.order-id {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 1rem 0 2rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--color-accent);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 300;
    animation: slideIn 0.3s ease;
}

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.error-message {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-light);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-light);
}

/* Responsive Shop */
@media (max-width: 768px) {
    .category-products {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .cart-summary {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        justify-content: center;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

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