/*
Theme Name: Khalifa Bakers
Theme URI: https://khalifabakers.shop
Author: Antigravity
Author URI: https://google.com
Description: A custom theme for Khalifa Bakers - The Original Taste of Lahore's Walled City.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: khalifa-bakers
*/

/* CSS Variables */
:root {
    --gold: #D4AF37;
    --gold-dark: #B4941F;
    --red-primary: #7b0503;
    --red-dark: #5a0402;
    --brown-dark: #2C1810;
    --brown-light: #5D4037;
    --cream: #FFF8E1;
    --white: #FFFFFF;
    --off-white: #F8F5F0;
    --text-primary: #2C1810;
    --text-secondary: #5D4037;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --border-radius: 12px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    /* Reset body margin for WP admin bar compatibility */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--brown-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--red-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(123, 5, 3, 0.4);
}

.btn-primary:hover {
    background-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 5, 3, 0.6);
}

.btn-outline {
    border-color: var(--gold);
    color: var(--gold);
    background: transparent;
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--white);
}

/* Header */
.header {
    background: var(--red-primary);
    padding: var(--spacing-sm) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* WordPress Admin Bar Compatibility */
body.admin-bar .header {
    top: 32px;
    /* Default WP Admin bar height */
}

@media screen and (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
        /* Mobile WP Admin bar height */
    }
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-wrapper {
    background-color: var(--white);
    padding: 5px 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    height: 60px;
}

.logo-img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    align-items: center;
    /* Ensure SVGs are centered */
    justify-content: center;
    padding: 5px;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.35)), url('https://khalifbakers.shop/wp-content/uploads/2025/12/generated_image_fc2b219e-9344-4888-9a65-da496fe96d15.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 var(--spacing-sm);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 3px;
    margin-bottom: var(--spacing-md);
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 500;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-title .khalifa {
    color: var(--white);
    display: block;
    font-weight: 700;
}

.hero-title .bakers {
    color: var(--gold);
    display: block;
    font-weight: 700;
}

.hero-tagline {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: var(--spacing-md);
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease-out 0.4s backwards;
    color: var(--white);
    text-transform: capitalize;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.6s backwards;
    line-height: 1.7;
}

/* Products Section */
.products {
    padding: var(--spacing-xl) 0;
    background: var(--cream);
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
}

/*
   CREATIVE PRODUCT GRID
   Redesigned for a more premium, airy feel like the reference
*/
/*
   EXACT CLONE OF KHALIFABAKERY.PK PRODUCT STYLE
*/
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.product-img-box {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* MATCHING SOURCE SCRIPT EXACTLY */
    display: block;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #D32F2F;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    /* Source uses simpler radius */
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.product-info {
    padding: 20px;
    text-align: center;
    background: #fff;
}

.p-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 5px 0;
}

.p-price {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #850000;
    /* Dark Red from source */
    margin: 0 0 15px 0;
}

.btn-whatsapp {
    display: block !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    width: 100%;
    text-decoration: none;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: auto;
    text-align: center;
}

.btn-whatsapp:hover {
    background-color: #333333 !important;
    color: #ffffff !important;
    text-decoration: none;
}

/* Floating Call Button */
.floating-call-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    /* WhatsApp/Call Green */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    font-size: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-call-btn:hover {
    transform: scale(1.1);
    background-color: #128C7E;
    color: white;
}

/* About Section */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--brown-dark);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text h2 {
    color: var(--gold);
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.about-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-sm);
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 500;
}

.about-text p {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.about-image {
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--gold);
    z-index: 0;
    border-radius: var(--border-radius);
}

.about-image img {
    position: relative;
    z-index: 1;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    width: 100%;
    height: auto;
}

/* Footer */
.footer {
    background: #1a0f0a;
    color: rgba(255, 255, 255, 0.6);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    text-align: center;
}

.footer-content {
    margin-bottom: var(--spacing-md);
}

.footer h3 {
    color: var(--gold);
    margin-bottom: var(--spacing-sm);
    font-size: 1.8rem;
}

.footer p {
    margin-bottom: var(--spacing-xs);
}

.footer a {
    color: var(--gold);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--white);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.contact-item i {
    color: var(--gold);
    font-size: 1.2rem;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*
   FIXED IMAGE CONTAINER
   Using a more open design to let images breathe
*/
.product-image-container {
    position: relative;
    padding: 10px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 320px;
    /* Further increased height */
    margin-top: -40px;
    /* Pull image up more */
    z-index: 1;
}

/* Creative background blob behind image */
.product-image-container::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: var(--off-white);
    border-radius: 50%;
    z-index: -1;
    top: 55%;
    /* Moved slightly down to center visually behind product */
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    transition: transform 0.4s ease;
}

.product-card:hover .product-image-container::after {
    transform: translate(-50%, -50%) scale(1.2);
    background: #FFF8E1;
}

.product-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.15));
    /* Stronger shadow */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    /*
       CRITICAL FIX:
       Scaling up by default to remove empty whitespace in the PNGs
       This will make the product look "complete" and fill the box.
    */
    transform: scale(1.35);
}

.product-card:hover .product-image img {
    transform: scale(1.45) rotate(3deg) translateY(-10px);
    /* Even larger on hover */
}

.bestseller-badge {
    position: absolute;
    top: -10px;
    /* Moved up to clear the image area */
    left: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-image-container {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .header .nav {
        flex-direction: row;
        justify-content: space-between;
    }

    .logo-wrapper {
        padding: 5px 10px;
        height: 55px;
    }

    .logo-img {
        height: 45px;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--red-primary);
        flex-direction: column;
        align-items: center;
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-text h2 {
        font-size: 2.2rem;
    }

    .about-image::before {
        top: -10px;
        left: -10px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .product-image-container {
        height: 240px;
        padding: 15px;
    }

    .contact-info {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.85rem;
    }

    .product-image-container {
        height: 220px;
        /* Kept good size for mobile */
        padding: 10px;
    }
}