/* ==========================================================================
   Deliciously Pro Theme - Bakery & Café Styles
   ========================================================================== */

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ensure adequate contrast for accessibility */
    background: rgba(0, 0, 0, 0.6); 
    z-index: 2;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(17, 17, 17, 0.2), rgba(17, 17, 17, 0.6));
    z-index: 3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 4; /* Updated to sit above overlay */
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    /* FIXED: Changed variable to semantic naming for text color */
    color: var(--color-white, #ffffff); 
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    /* FIXED: Use specific text color variable */
    color: var(--color-text-light, #f0f0f0);
}

.hero-image img {
    margin-top: 35px;
    height: 270px;
    width: 270px;
    border-radius: 15px;
    object-fit: cover; /* Ensure image doesn't stretch */
}

/* --- Beverage Categories Section --- */
.beverages-products-section {
    padding: 6rem 0;
    background-color: var(--color-surface, #ffffff);
}

.beverages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.beverage-card {
    background-color: var(--color-bg, #ffffff);
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-sm, 0 4px 6px rgba(0,0,0,0.05));
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.beverage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md, 0 10px 15px rgba(0,0,0,0.1));
}

.beverage-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.beverage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* Smoother transition */
}

.beverage-card:hover .beverage-image img {
    transform: scale(1.08);
}

.beverage-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--color-accent, #ff6b6b);
    color: var(--color-white, #ffffff);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
}

.beverage-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.beverage-title {
    font-family: var(--font-serif, serif);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text, #333333);
}

.beverage-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.beverage-title a:hover {
    color: var(--color-accent, #ff6b6b);
}

.beverage-description {
    font-size: 0.875rem;
    color: var(--color-text-muted, #666666);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.beverage-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border, #eeeeee);
}

.beverage-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-accent, #ff6b6b);
}

/* --- Bakery Products Section --- */
.bakery-products {
    padding: 6rem 0;
    background-color: var(--color-bg, #ffffff);
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background-color: var(--color-surface, #ffffff);
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-sm, 0 4px 6px rgba(0,0,0,0.05));
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md, 0 10px 15px rgba(0,0,0,0.1));
}

.product-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 30%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-family: var(--font-serif, serif);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--color-text, #333333);
}

.product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.product-name a:hover {
    color: var(--color-accent, #ff6b6b);
}

.product-description {
    font-size: 0.875rem;
    color: var(--color-text-muted, #666666);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-accent, #ff6b6b);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Story Section --- */
.bakery-story {
    padding: 6rem 0;
    background-color: var(--color-surface, #ffffff);
}

.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.story-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-md, 0 10px 15px rgba(0,0,0,0.1));
}

.story-subtitle {
    font-family: var(--font-serif, serif);
    font-size: 1.5rem;
    color: var(--color-accent, #ff6b6b);
    margin-bottom: 1rem;
}

.story-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text-muted, #666666);
    margin-bottom: 1.5rem;
}

/* --- Ordering Section --- */
.online-ordering {
    padding: 6rem 0;
    background-color: var(--color-bg, #ffffff);
}

.ordering-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.step {
    background-color: var(--color-surface, #ffffff);
    padding: 2rem;
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-sm, 0 4px 6px rgba(0,0,0,0.05));
    text-align: center;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md, 0 10px 15px rgba(0,0,0,0.1));
}

.step-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent, #ff6b6b);
    margin-bottom: 1rem;
}

.step-icon {
    font-size: 2rem;
    color: var(--color-accent, #ff6b6b);
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-bg);
}

.step-description {
    font-size: 0.875rem;
    color: var(--color-bg);
    line-height: 1.5;
}

/* --- Instagram Section --- */
.social-feed {
    padding: 6rem 0;
    background-color: var(--color-surface, #ffffff);
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.instagram-item {
    position: relative;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 4px 6px rgba(0,0,0,0.05));
    aspect-ratio: 1 / 1; /* Better performance than fixed height */
}

.instagram-image {
    height: 100%;
    width: 100%;
}

.instagram-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.instagram-item:hover .instagram-image img {
    transform: scale(1.08);
}

.instagram-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.8), transparent);
    padding: 1.5rem;
    color: var(--color-white, #ffffff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instagram-item:hover .instagram-overlay {
    opacity: 1;
}

.instagram-caption {
    font-size: 0.875rem;
    margin: 0;
}
.instagram-cta{
    margin-top: 155px;
    z-index: 2;
}
/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-serif, serif);
    font-size: 2.25rem;
    color: var(--color-text, #333333);
    margin-bottom: 1rem;
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--color-bg);
    margin: 0 auto 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-bg);
    max-width: 600px;
    margin: 0 auto;
}

.product-tag {
    display: inline-block;
    background-color: var(--color-accent, #ff6b6b);
    color: var(--color-white, #ffffff);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 600;
    border-radius: var(--radius-sm, 4px);
    padding: 0.65rem 1.15rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.18s ease;
    font-family: var(--font-sans, sans-serif);
    text-decoration: none;
    font-size: 1rem;
}

.btn:active,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md, 0 10px 15px rgba(0,0,0,0.1));
    outline: none;
}

/* ADDED: Focus visible for accessibility */
.btn:focus-visible {
    outline: 2px solid var(--color-text, #333333);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(180deg, var(--color-accent, #ff6b6b), var(--color-accent-dark, #e05e5e));
    color: var(--color-white, #ffffff);
    box-shadow: var(--shadow-sm, 0 4px 6px rgba(0,0,0,0.1));
    border-radius: calc(var(--radius-sm, 4px) + 2px);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--color-accent-dark, #e05e5e), var(--color-accent, #ff6b6b));
    box-shadow: var(--shadow-md, 0 10px 15px rgba(0,0,0,0.15));
}

.btn-outline {
    background: transparent;
    color: var(--color-text, #333333);
    border: 1px solid var(--color-border, #dddddd);
}

.btn-outline:hover {
    background-color: var(--color-accent, #ff6b6b);
    color: var(--color-white, #ffffff);
    border-color: var(--color-accent, #ff6b6b);
}

/* --- Animations (Cleaned up) --- */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-fade-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeLeft 0.8s ease forwards; /* Specific keyframe */
}

.animate-fade-right {
    opacity: 0;
    transform: translateX(30px);
    animation: fadeRight 0.8s ease forwards; /* Specific keyframe */
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .story-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .story-image {
        order: -1; /* Image on top on mobile */
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .ordering-steps {
        grid-template-columns: 1fr;
    }
    
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn {
        width: 100%; /* Full width buttons on mobile */
        gap: 0.5rem;
        padding: 0.8rem 1rem;
        font-size: 0.875rem;
        justify-content: center;
    }
    
    .instagram-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   END BAKERY HOMEPAGE STYLES
   ====================================================== */