<?php
/*
=============================================================================
  ELEGANT PHOTO STUDIO — WORDPRESS THEME
  Version: 1.0  |  Author: YTWC Pvt Ltd  |  elegantphotostudio.in
=============================================================================

HOW TO INSTALL (5 minutes):
  1. On your computer, create a folder named: elegant-photo-studio
  2. Copy each file below into that folder (each file starts with ===FILE===)
  3. ZIP the folder
  4. WordPress Admin → Appearance → Themes → Add New → Upload Theme → select ZIP
  5. Click Activate

RECOMMENDED FREE PLUGINS (install from WP Admin → Plugins → Add New):
  • Site Kit by Google     → Google Analytics + Search Console + Tag Manager
  • Yoast SEO              → SEO meta tags, sitemaps, breadcrumbs
  • Contact Form 7         → Booking / enquiry form
  • LiteSpeed Cache        → Speed optimisation (Hostinger uses LiteSpeed)
  • Smush                  → Image compression

AFTER THEME ACTIVATION:
  1. Settings → Reading → set "Your homepage displays" to Static Page
  2. Set Homepage to a page called "Home" and Posts page to "Blog" (or leave empty)
  3. Appearance → Menus → create Primary Menu
  4. Appearance → Customize → Site Identity → upload your logo
  5. Go to Services → Add New to add each service
  6. Assign each service to a Service Type: corporate or personal
  7. Upload gallery images inside each service using the Gallery meta box

=============================================================================
*/


/* ============================================================================
   FILE: style.css
   (This is the main CSS file — WordPress reads the theme name from here)
============================================================================ */
?>
/*
Theme Name:  Elegant Photo Studio
Theme URI:   https://www.elegantphotostudio.in
Author:      YTWC Pvt Ltd
Description: Professional photography & videography studio theme for Gurgaon Delhi NCR
Version:     1.0
Text Domain: eps
*/

:root {
  --gold: #C9A84C;
  --gold-light: rgba(201,168,76,0.15);
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --text: #ffffff;
  --text-muted: #888888;
  --text-dim: #555555;
  --border: #1e1e1e;
  --green: #25D366;
}
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { background:var(--bg); color:var(--text); font-family:'Helvetica Neue',Arial,sans-serif; -webkit-font-smoothing:antialiased; }
img { max-width:100%; height:auto; }
a { color:inherit; text-decoration:none; }
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-thumb { background:#2a2a2a; border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--gold); }

/* HEADER */
.site-header { position:fixed; top:0; left:0; right:0; z-index:1000; padding:0 2rem; transition:all 0.35s ease; height:68px; display:flex; align-items:center; }
.site-header.scrolled { background:rgba(10,10,10,0.97); backdrop-filter:blur(12px); border-bottom:1px solid rgba(201,168,76,0.2); }
.header-inner { max-width:1200px; margin:0 auto; width:100%; display:flex; align-items:center; justify-content:space-between; }
.site-logo img { height:46px; width:auto; object-fit:contain; }
.site-logo .text-logo { font-family:Georgia,serif; color:var(--gold); font-size:1rem; letter-spacing:0.18em; line-height:1; }
.site-logo .text-logo span { display:block; color:#fff; font-size:0.56rem; letter-spacing:0.28em; margin-top:2px; }
.primary-nav { display:flex; align-items:center; gap:0.3rem; }
.primary-nav a { color:#bbb; padding:8px 14px; font-size:0.82rem; font-weight:400; letter-spacing:0.06em; transition:color 0.2s; }
.primary-nav a:hover, .primary-nav a.current { color:var(--gold); }
.btn-booknow { background:var(--gold); color:#000 !important; padding:8px 22px !important; border-radius:3px; font-weight:700 !important; margin-left:8px; }
.btn-whatsapp { background:var(--green); color:#fff !important; padding:8px 14px !important; border-radius:3px; margin-left:4px; }
.menu-toggle { display:none; background:none; border:none; color:#fff; font-size:1.4rem; cursor:pointer; }
.mobile-nav { display:none; background:#0d0d0d; padding:0.5rem 2rem 1.5rem; border-top:1px solid #222; }
.mobile-nav a { display:block; color:#ccc; padding:12px 0; font-size:0.95rem; border-bottom:1px solid #1a1a1a; }
.mobile-nav a:hover { color:var(--gold); }

/* SPLIT HOMEPAGE */
.split-hero { height:100vh; display:flex; overflow:hidden; position:relative; }
.split-side { flex:0 0 50%; overflow:hidden; position:relative; cursor:pointer; transition:flex 0.5s cubic-bezier(0.4,0,0.2,1); }
.split-side:hover { flex:0 0 62%; }
.split-side:hover ~ .split-side, .split-hero:has(.split-side:hover) .split-side:not(:hover) { flex:0 0 38%; }
.split-side img { width:100%; height:100%; object-fit:cover; transition:transform 0.7s; }
.split-side:hover img { transform:scale(1.06); }
.split-overlay { position:absolute; inset:0; background:rgba(0,0,0,0.52); transition:background 0.4s; }
.split-side:hover .split-overlay { background:rgba(0,0,0,0.38); }
.split-divider { position:absolute; top:0; bottom:0; left:50%; width:2px; background:linear-gradient(to bottom,transparent,var(--gold),transparent); z-index:2; pointer-events:none; }
.split-content { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:flex-end; padding:clamp(1.5rem,4vw,3.5rem); }
.split-label { color:var(--gold); font-size:0.68rem; letter-spacing:0.22em; text-transform:uppercase; margin-bottom:8px; font-weight:600; }
.split-title { color:#fff; font-size:clamp(1.6rem,3.5vw,3rem); font-family:Georgia,serif; line-height:1.2; margin-bottom:12px; }
.split-sub { color:rgba(255,255,255,0.68); font-size:0.85rem; max-width:280px; margin-bottom:20px; line-height:1.7; }
.split-cta { color:var(--gold); font-size:0.82rem; font-weight:600; display:flex; align-items:center; gap:10px; }
.split-cta::after { content:'→'; transition:transform 0.3s; }
.split-side:hover .split-cta::after { transform:translateX(7px); }
.hero-center { position:absolute; top:0; left:0; right:0; z-index:10; text-align:center; padding-top:86px; pointer-events:none; }
.hero-center-brand { color:var(--gold); font-size:0.65rem; letter-spacing:0.32em; text-transform:uppercase; margin-bottom:6px; }
.hero-center-name { color:#fff; font-size:1.05rem; font-family:Georgia,serif; letter-spacing:0.18em; }
.hero-center-line { width:50px; height:1px; background:var(--gold); margin:10px auto; }
.hero-center-location { color:rgba(255,255,255,0.5); font-size:0.68rem; letter-spacing:0.12em; }
.scroll-hint { position:absolute; bottom:28px; left:50%; transform:translateX(-50%); text-align:center; z-index:10; pointer-events:none; }
.scroll-hint span { display:block; color:rgba(255,255,255,0.45); font-size:0.65rem; letter-spacing:0.16em; text-transform:uppercase; }
.scroll-hint i { color:var(--gold); font-size:1rem; margin-top:2px; display:block; }

/* STATS BAR */
.stats-bar { background:var(--surface); border-top:1px solid rgba(201,168,76,0.12); border-bottom:1px solid rgba(201,168,76,0.12); padding:2.5rem 2rem; }
.stats-inner { max-width:900px; margin:0 auto; display:flex; justify-content:space-around; flex-wrap:wrap; gap:1.5rem; }
.stat-item { text-align:center; }
.stat-number { font-size:1.9rem; font-weight:700; color:var(--gold); font-family:Georgia,serif; }
.stat-label { color:var(--text-dim); font-size:0.72rem; letter-spacing:0.12em; text-transform:uppercase; margin-top:4px; }

/* SECTION HEADING */
.section-wrap { padding:5rem 2rem; max-width:1200px; margin:0 auto; }
.section-label { color:var(--gold); font-size:0.72rem; letter-spacing:0.2em; text-transform:uppercase; margin-bottom:8px; }
.section-title { color:#fff; font-size:1.9rem; font-family:Georgia,serif; margin-bottom:2.5rem; }
.section-center { text-align:center; }

/* FEATURED GALLERY GRID */
.featured-grid { display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:240px 240px; gap:8px; }
.featured-grid .grid-main { grid-row:1/3; border-radius:5px; overflow:hidden; }
.featured-grid .grid-item { border-radius:5px; overflow:hidden; }
.featured-grid img { width:100%; height:100%; object-fit:cover; }

/* SERVICE CARDS */
.services-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:1.4rem; }
.service-card { background:var(--surface); border:1px solid var(--border); border-radius:5px; overflow:hidden; cursor:pointer; transition:all 0.3s; }
.service-card:hover { border-color:var(--gold); transform:translateY(-5px); box-shadow:0 12px 40px rgba(201,168,76,0.12); }
.service-card-img { position:relative; height:210px; overflow:hidden; }
.service-card-img img { width:100%; height:100%; object-fit:cover; transition:transform 0.6s; }
.service-card:hover .service-card-img img { transform:scale(1.07); }
.service-card-img-overlay { position:absolute; inset:0; background:linear-gradient(to top,rgba(0,0,0,0.7),transparent 55%); }
.service-price { position:absolute; bottom:12px; left:14px; color:var(--gold); font-size:0.7rem; font-weight:700; }
.service-card-body { padding:1.2rem; }
.service-card-title { color:#fff; font-size:1rem; font-family:Georgia,serif; margin-bottom:5px; }
.service-card-sub { color:var(--text-muted); font-size:0.8rem; line-height:1.6; margin-bottom:10px; }
.service-card-link { color:var(--gold); font-size:0.78rem; font-weight:600; }

/* PAGE HERO */
.page-hero { position:relative; height:420px; overflow:hidden; }
.page-hero img { width:100%; height:100%; object-fit:cover; }
.page-hero-overlay { position:absolute; inset:0; background:rgba(0,0,0,0.55); }
.page-hero-content { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; padding:2rem clamp(1.5rem,6vw,5rem); }
.page-hero-label { color:var(--gold); font-size:0.72rem; letter-spacing:0.2em; text-transform:uppercase; margin-bottom:10px; }
.page-hero h1 { color:#fff; font-size:clamp(1.8rem,5vw,3.2rem); font-family:Georgia,serif; line-height:1.25; margin-bottom:14px; max-width:600px; }
.page-hero p { color:rgba(255,255,255,0.75); max-width:520px; line-height:1.75; font-size:0.9rem; margin-bottom:26px; }
.btn-gold { display:inline-block; background:var(--gold); color:#000; padding:12px 30px; border-radius:3px; font-weight:700; font-size:0.92rem; border:none; cursor:pointer; transition:opacity 0.2s; }
.btn-gold:hover { opacity:0.85; color:#000; }
.btn-outline-gold { display:inline-block; background:transparent; color:var(--gold); padding:12px 26px; border:1px solid var(--gold); border-radius:3px; font-weight:600; font-size:0.88rem; }
.btn-outline-gold:hover { background:var(--gold-light); }

/* CATEGORY PAGE WITH GALLERY */
.category-intro { padding:4rem 2rem; max-width:1200px; margin:0 auto; }
.category-services-section { padding:0 2rem 4rem; max-width:1200px; margin:0 auto; }

/* MINI GALLERY ON CATEGORY PAGE */
.service-with-gallery { margin-bottom:4rem; }
.service-gallery-header { display:flex; align-items:flex-start; justify-content:space-between; gap:2rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.service-gallery-info h2 { color:#fff; font-family:Georgia,serif; font-size:1.4rem; margin-bottom:6px; }
.service-gallery-info .price-tag { color:var(--gold); font-size:0.85rem; font-weight:600; margin-bottom:8px; }
.service-gallery-info p { color:var(--text-muted); font-size:0.85rem; line-height:1.7; max-width:500px; }
.mini-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:8px; }
.mini-gallery a { display:block; border-radius:4px; overflow:hidden; height:140px; }
.mini-gallery a img { width:100%; height:100%; object-fit:cover; transition:transform 0.4s; }
.mini-gallery a:hover img { transform:scale(1.05); }
.gallery-divider { border:none; border-top:1px solid var(--border); margin:3rem 0; }

/* SINGLE SERVICE PAGE */
.service-detail { max-width:1100px; margin:0 auto; padding:4rem 2rem; }
.service-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:4rem; align-items:start; }
.includes-list { list-style:none; }
.includes-list li { display:flex; gap:12px; margin-bottom:11px; color:#bbb; font-size:0.88rem; line-height:1.6; }
.includes-list li::before { content:'✓'; color:var(--gold); flex-shrink:0; }
.service-main-img { border-radius:5px; overflow:hidden; height:400px; }
.service-main-img img { width:100%; height:100%; object-fit:cover; }

/* SERVICE GALLERY */
.service-gallery-section { background:#0d0d0d; padding:4rem 2rem; }
.service-gallery-section .section-wrap { padding:0; max-width:1100px; }
.service-gallery-title { color:#fff; font-family:Georgia,serif; font-size:1.3rem; margin-bottom:1.5rem; }
.service-gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; }
.service-gallery-grid a { display:block; border-radius:4px; overflow:hidden; height:180px; }
.service-gallery-grid a img { width:100%; height:100%; object-fit:cover; transition:transform 0.4s; }
.service-gallery-grid a:hover img { transform:scale(1.05); }

/* REVIEWS */
.reviews-section { background:var(--bg); padding:5rem 2rem; border-top:1px solid rgba(201,168,76,0.1); }
.reviews-inner { max-width:1100px; margin:0 auto; }
.reviews-header { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:1.5rem; margin-bottom:3rem; }
.google-badge { display:flex; align-items:center; gap:6px; background:var(--surface); border:1px solid var(--border); border-radius:4px; padding:8px 14px; }
.google-badge .stars { color:#F9AB00; letter-spacing:-2px; }
.reviews-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:1.2rem; }
.review-card { background:var(--surface); border:1px solid var(--border); border-radius:5px; padding:1.5rem; }
.review-meta { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.reviewer-info { display:flex; align-items:center; gap:10px; }
.reviewer-avatar { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:1rem; flex-shrink:0; }
.reviewer-name { color:#e8e8e8; font-size:0.88rem; font-weight:600; }
.reviewer-date { color:#484848; font-size:0.7rem; margin-top:1px; }
.review-stars { color:#F9AB00; font-size:0.85rem; margin-bottom:6px; }
.service-tag { background:var(--gold-light); color:var(--gold); font-size:0.65rem; font-weight:600; padding:2px 8px; border-radius:10px; display:inline-block; margin-bottom:8px; }
.review-text { color:#999; font-size:0.83rem; line-height:1.75; }

/* STUDIO TEASER BANNER */
.studio-banner { position:relative; height:400px; overflow:hidden; }
.studio-banner img { width:100%; height:100%; object-fit:cover; }
.studio-banner-overlay { position:absolute; inset:0; background:rgba(0,0,0,0.58); display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:2rem; }
.studio-banner-label { color:var(--gold); font-size:0.7rem; letter-spacing:0.22em; text-transform:uppercase; margin-bottom:10px; }
.studio-banner h2 { color:#fff; font-size:clamp(1.6rem,4vw,2.5rem); font-family:Georgia,serif; margin-bottom:14px; }
.studio-banner p { color:rgba(255,255,255,0.72); max-width:480px; line-height:1.75; margin-bottom:26px; font-size:0.88rem; }

/* BOOK CTA */
.book-cta { background:linear-gradient(135deg,#0e0e0e,#1a1500); border:1px solid rgba(201,168,76,0.25); margin:4rem auto; border-radius:6px; padding:3.5rem 2rem; text-align:center; max-width:860px; }
.book-cta-label { color:var(--gold); font-size:0.72rem; letter-spacing:0.2em; text-transform:uppercase; margin-bottom:12px; }
.book-cta h2 { color:#fff; font-size:1.9rem; font-family:Georgia,serif; margin-bottom:12px; }
.book-cta p { color:var(--text-muted); margin-bottom:28px; font-size:0.9rem; }
.cta-buttons { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* STUDIO PAGE */
.studio-features { display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:1.4rem; margin-bottom:4rem; }
.studio-feature-card { background:var(--surface); border:1px solid var(--border); border-radius:5px; padding:1.5rem; }
.studio-feature-icon { font-size:1.8rem; margin-bottom:10px; }
.studio-feature-title { color:var(--gold); font-size:0.95rem; font-family:Georgia,serif; margin-bottom:8px; }
.studio-feature-desc { color:var(--text-muted); font-size:0.82rem; line-height:1.65; }
.pricing-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1.4rem; margin-bottom:2rem; }
.pricing-card { background:var(--surface); border:1px solid var(--border); border-radius:5px; padding:2rem; text-align:center; position:relative; }
.pricing-card.popular { border-color:var(--gold); }
.pricing-popular-badge { position:absolute; top:-12px; left:50%; transform:translateX(-50%); background:var(--gold); color:#000; padding:3px 18px; border-radius:20px; font-size:0.65rem; font-weight:700; white-space:nowrap; }
.pricing-slot { color:var(--text-dim); font-size:0.72rem; letter-spacing:0.1em; text-transform:uppercase; margin-bottom:8px; }
.pricing-price { color:#fff; font-size:2rem; font-family:Georgia,serif; margin-bottom:8px; }
.pricing-note { color:var(--text-dim); font-size:0.78rem; }

/* BOOKING FORM */
.booking-wrap { max-width:760px; margin:0 auto; padding:4rem 2rem; }
.booking-section { margin-bottom:2.5rem; }
.booking-section-title { color:var(--gold); font-size:0.7rem; letter-spacing:0.16em; text-transform:uppercase; margin-bottom:1.2rem; padding-bottom:8px; border-bottom:1px solid #1a1a1a; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1rem; }
.form-field { margin-bottom:1rem; }
.form-field label { color:#666; font-size:0.76rem; display:block; margin-bottom:6px; }
.form-field input, .form-field select, .form-field textarea {
  width:100%; background:#0e0e0e; border:1px solid #262626; border-radius:3px;
  padding:11px 14px; color:#e0e0e0; font-size:0.88rem; outline:none; box-sizing:border-box;
  font-family:inherit; color-scheme:dark;
}
.form-field textarea { resize:vertical; line-height:1.6; }
.setup-options { display:grid; grid-template-columns:repeat(auto-fill,minmax(195px,1fr)); gap:0.6rem; }
.setup-btn { background:#0e0e0e; border:1px solid #262626; border-radius:3px; padding:10px 14px; color:#777; cursor:pointer; font-size:0.8rem; text-align:left; transition:all 0.2s; }
.setup-btn.active { background:var(--gold-light); border-color:var(--gold); color:var(--gold); }
.addon-options { display:flex; flex-wrap:wrap; gap:0.6rem; }
.addon-btn { background:#0e0e0e; border:1px solid #262626; border-radius:20px; padding:8px 16px; color:#777; cursor:pointer; font-size:0.8rem; transition:all 0.2s; }
.addon-btn.active { background:var(--gold-light); border-color:var(--gold); color:var(--gold); }
.submit-btn { width:100%; background:var(--gold); color:#000; padding:16px; border:none; border-radius:3px; font-weight:700; font-size:1rem; cursor:pointer; }
.submit-note { color:#444; font-size:0.76rem; text-align:center; margin-top:10px; }

/* FOOTER */
.site-footer { background:#060606; border-top:1px solid rgba(201,168,76,0.15); padding:4rem 2rem 2rem; }
.footer-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:2.5rem; max-width:1200px; margin:0 auto; margin-bottom:3rem; }
.footer-brand p { color:#666; font-size:0.8rem; line-height:1.75; margin:14px 0; }
.footer-contact a { color:var(--gold); font-size:0.8rem; display:block; margin-bottom:5px; }
.footer-social { display:flex; gap:12px; margin-top:12px; }
.footer-social a { color:#555; font-size:0.8rem; transition:color 0.2s; }
.footer-social a:hover { color:var(--gold); }
.footer-col h4 { color:var(--gold); font-size:0.72rem; letter-spacing:0.14em; text-transform:uppercase; margin-bottom:14px; font-weight:600; }
.footer-col ul { list-style:none; }
.footer-col ul li a { color:#777; font-size:0.82rem; display:block; padding:4px 0; transition:color 0.2s; }
.footer-col ul li a:hover { color:var(--gold); }
.footer-bottom { border-top:1px solid #1a1a1a; padding-top:1.5rem; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; max-width:1200px; margin:0 auto; }
.footer-bottom p { color:#444; font-size:0.75rem; }

/* UTILS */
.bg-dark-section { background:#0d0d0d; padding:4rem 2rem; }
.text-gold { color:var(--gold); }
.font-serif { font-family:Georgia,serif; }
.wp-block-image img { border-radius:5px; }

/* RESPONSIVE */
@media (max-width:900px) {
  .service-detail-grid { grid-template-columns:1fr; }
  .featured-grid { grid-template-columns:1fr 1fr; grid-template-rows:180px 180px 180px; }
  .featured-grid .grid-main { grid-row:1/2; grid-column:1/3; }
}
@media (max-width:768px) {
  .primary-nav { display:none; }
  .menu-toggle { display:block; }
  .split-side { flex:0 0 50% !important; }
  .split-title { font-size:1.4rem; }
  .reviews-grid, .services-grid { grid-template-columns:1fr; }
  .form-grid { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:500px) {
  .featured-grid { grid-template-columns:1fr; grid-template-rows:auto; }
  .featured-grid .grid-main { grid-row:auto; grid-column:auto; height:220px; }
  .footer-grid { grid-template-columns:1fr; }
  .cta-buttons { flex-direction:column; align-items:center; }
}

/* WORDPRESS ADMIN BAR OFFSET */
.admin-bar .site-header { top:32px; }
@media screen and (max-width:782px) { .admin-bar .site-header { top:46px; } }


<?php
/* ============================================================================
   FILE: functions.php
============================================================================ */
?>
<?php
function eps_setup() {
    add_theme_support( 'title-tag' );
    add_theme_support( 'post-thumbnails' );
    add_theme_support( 'custom-logo', [ 'height' => 90, 'width' => 320, 'flex-width' => true, 'flex-height' => true ] );
    add_theme_support( 'html5', [ 'search-form', 'comment-form', 'gallery', 'caption' ] );
    add_image_size( 'eps-card', 520, 420, true );
    add_image_size( 'eps-hero', 1400, 600, true );
    add_image_size( 'eps-thumb', 360, 280, true );
    register_nav_menus( [ 'primary' => __( 'Primary Menu', 'eps' ) ] );
}
add_action( 'after_setup_theme', 'eps_setup' );

function eps_enqueue() {
    wp_enqueue_style( 'eps-style', get_stylesheet_uri(), [], '1.0' );
    wp_enqueue_script( 'eps-main', get_template_directory_uri() . '/js/main.js', [], '1.0', true );
}
add_action( 'wp_enqueue_scripts', 'eps_enqueue' );

// ── CUSTOM POST TYPE: Services ────────────────────────────────────────────────
function eps_register_cpt() {
    register_post_type( 'eps_service', [
        'labels'      => [
            'name'          => 'Services',
            'singular_name' => 'Service',
            'add_new_item'  => 'Add New Service',
            'edit_item'     => 'Edit Service',
            'all_items'     => 'All Services',
        ],
        'public'      => true,
        'has_archive' => false,
        'supports'    => [ 'title', 'editor', 'thumbnail', 'excerpt' ],
        'menu_icon'   => 'dashicons-camera',
        'rewrite'     => [ 'slug' => 'services' ],
        'show_in_rest'=> true,
    ] );

    register_taxonomy( 'service_type', 'eps_service', [
        'labels'       => [
            'name'          => 'Service Types',
            'singular_name' => 'Service Type',
            'add_new_item'  => 'Add New Type',
        ],
        'hierarchical' => true,
        'rewrite'      => [ 'slug' => 'service-type' ],
        'show_in_rest' => true,
    ] );
}
add_action( 'init', 'eps_register_cpt' );

// ── META BOXES ────────────────────────────────────────────────────────────────
function eps_add_meta_boxes() {
    add_meta_box( 'eps_price',    'Starting Price (e.g. Starting ₹15,000)', 'eps_price_cb',    'eps_service', 'side' );
    add_meta_box( 'eps_includes', "What's Included (one item per line)",    'eps_includes_cb', 'eps_service', 'normal' );
    add_meta_box( 'eps_gallery',  'Service Gallery Photos',                  'eps_gallery_cb',  'eps_service', 'normal' );
}
add_action( 'add_meta_boxes', 'eps_add_meta_boxes' );

function eps_price_cb( $post ) {
    $v = get_post_meta( $post->ID, '_eps_price', true );
    echo '<input type="text" name="eps_price" value="' . esc_attr( $v ) . '" style="width:100%;padding:6px 8px;" placeholder="Starting ₹15,000">';
}
function eps_includes_cb( $post ) {
    $v = get_post_meta( $post->ID, '_eps_includes', true );
    echo '<textarea name="eps_includes" rows="6" style="width:100%;padding:6px 8px;" placeholder="Professional camera setup&#10;100+ edited images&#10;5-day delivery">' . esc_textarea( $v ) . '</textarea>';
    echo '<p style="color:#888;font-size:12px;margin-top:4px;">One item per line. Each line becomes a ✓ checkmark.</p>';
}
function eps_gallery_cb( $post ) {
    $ids = get_post_meta( $post->ID, '_eps_gallery_ids', true );
    wp_nonce_field( 'eps_save_meta', 'eps_meta_nonce' );
    echo '<div id="eps-gallery-wrap" style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px;">';
    if ( $ids ) {
        foreach ( explode( ',', $ids ) as $id ) {
            $src = wp_get_attachment_image_src( $id, 'thumbnail' );
            if ( $src ) echo '<img src="' . $src[0] . '" style="width:80px;height:80px;object-fit:cover;border-radius:4px;">';
        }
    }
    echo '</div>';
    echo '<input type="hidden" id="eps-gallery-ids" name="eps_gallery_ids" value="' . esc_attr( $ids ) . '">';
    echo '<button type="button" id="eps-add-gallery" class="button">+ Add / Edit Gallery Photos</button>';
    echo '<script>
    jQuery(function($){
        var frame;
        $("#eps-add-gallery").on("click",function(){
            if(frame){frame.open();return;}
            frame=wp.media({title:"Select Gallery Photos",button:{text:"Add to Gallery"},multiple:true});
            frame.on("select",function(){
                var ids=frame.state().get("selection").map(function(a){return a.id;}).join(",");
                $("#eps-gallery-ids").val(ids);
                var html="";
                frame.state().get("selection").each(function(a){
                    html+="<img src=\\""+a.attributes.sizes.thumbnail.url+"\\" style=\\"width:80px;height:80px;object-fit:cover;border-radius:4px;\\">";
                });
                $("#eps-gallery-wrap").html(html);
            });
            frame.open();
        });
    });
    </script>';
}

function eps_save_meta( $post_id ) {
    if ( ! isset( $_POST['eps_meta_nonce'] ) || ! wp_verify_nonce( $_POST['eps_meta_nonce'], 'eps_save_meta' ) ) return;
    if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;
    if ( ! current_user_can( 'edit_post', $post_id ) ) return;
    if ( isset($_POST['eps_price']) )        update_post_meta( $post_id, '_eps_price',       sanitize_text_field($_POST['eps_price']) );
    if ( isset($_POST['eps_includes']) )     update_post_meta( $post_id, '_eps_includes',    sanitize_textarea_field($_POST['eps_includes']) );
    if ( isset($_POST['eps_gallery_ids']) )  update_post_meta( $post_id, '_eps_gallery_ids', sanitize_text_field($_POST['eps_gallery_ids']) );
}
add_action( 'save_post', 'eps_save_meta' );

// Helper: get gallery images for a service
function eps_get_gallery( $post_id, $limit = 0 ) {
    $ids = get_post_meta( $post_id, '_eps_gallery_ids', true );
    if ( ! $ids ) return [];
    $arr = array_filter( explode( ',', $ids ) );
    return $limit ? array_slice( $arr, 0, $limit ) : $arr;
}

// Helper: get includes list
function eps_get_includes( $post_id ) {
    $raw = get_post_meta( $post_id, '_eps_includes', true );
    if ( ! $raw ) return [];
    return array_filter( array_map( 'trim', explode( "\n", $raw ) ) );
}

// Customizer for footer text and contact
function eps_customizer( $wp_customize ) {
    $wp_customize->add_section( 'eps_contact', [ 'title' => 'Studio Contact Info', 'priority' => 30 ] );
    foreach ( [
        ['eps_phone',    'Phone Number',    '+91 99904 33318'],
        ['eps_address',  'Address',         'Sector 77, Gurgaon, Haryana'],
        ['eps_whatsapp', 'WhatsApp Number', '919990433318'],
        ['eps_insta',    'Instagram URL',   'https://www.instagram.com/elegantphotostudio/'],
        ['eps_fb',       'Facebook URL',    'https://www.facebook.com/ElegantPhotos.in/'],
        ['eps_greview',  'Google Review URL','https://g.page/r/YOUR_LINK/review'],
    ] as [$key, $label, $default] ) {
        $wp_customize->add_setting( $key, [ 'default' => $default, 'sanitize_callback' => 'sanitize_text_field' ] );
        $wp_customize->add_control( $key, [ 'label' => $label, 'section' => 'eps_contact', 'type' => 'text' ] );
    }
}
add_action( 'customize_register', 'eps_customizer' );

function eps_get_opt( $key ) {
    return get_theme_mod( $key, '' );
}


<?php
/* ============================================================================
   FILE: header.php
============================================================================ */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
  <meta charset="<?php bloginfo('charset'); ?>">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>

<header class="site-header" id="site-header">
  <div class="header-inner">
    <div class="site-logo">
      <?php if ( has_custom_logo() ) : the_custom_logo();
      else : ?>
        <div class="text-logo">ELEGANT<span>PHOTO STUDIO</span></div>
      <?php endif; ?>
    </div>
    <nav class="primary-nav" id="primary-nav">
      <?php wp_nav_menu([ 'theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s', 'fallback_cb' => false ]); ?>
      <a href="<?php echo esc_url( get_permalink( get_page_by_path('book') ) ); ?>" class="btn-booknow">Book Now</a>
      <a href="https://wa.me/<?php echo esc_attr( eps_get_opt('eps_whatsapp') ?: '919990433318' ); ?>" target="_blank" class="btn-whatsapp">WhatsApp</a>
    </nav>
    <button class="menu-toggle" id="menu-toggle" aria-label="Toggle menu">☰</button>
  </div>
  <nav class="mobile-nav" id="mobile-nav" style="display:none;">
    <?php wp_nav_menu([ 'theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s', 'fallback_cb' => false ]); ?>
    <a href="<?php echo esc_url( get_permalink( get_page_by_path('book') ) ); ?>">Book Now</a>
  </nav>
</header>


<?php
/* ============================================================================
   FILE: footer.php
============================================================================ */
?>
<footer class="site-footer">
  <div class="footer-grid">
    <div class="footer-brand">
      <?php if ( has_custom_logo() ) the_custom_logo(); else echo '<div class="text-logo" style="font-family:Georgia,serif;color:#C9A84C;font-size:1rem;letter-spacing:.18em">ELEGANT<span style="display:block;color:#fff;font-size:.55rem;letter-spacing:.28em;margin-top:2px">PHOTO STUDIO</span></div>'; ?>
      <p>Professional photography & videography in Gurgaon. Capturing moments with elegance.</p>
      <div class="footer-contact">
        <a href="tel:<?php echo esc_attr( eps_get_opt('eps_phone') ): ?>">📞 <?php echo esc_html( eps_get_opt('eps_phone') ?: '+91 99904 33318' ); ?></a>
        <span style="color:#888;font-size:.8rem">📍 <?php echo esc_html( eps_get_opt('eps_address') ?: 'Sector 77, Gurgaon' ); ?></span>
      </div>
      <div class="footer-social">
        <a href="<?php echo esc_url( eps_get_opt('eps_insta') ); ?>" target="_blank">Instagram</a>
        <a href="<?php echo esc_url( eps_get_opt('eps_fb') ); ?>" target="_blank">Facebook</a>
      </div>
    </div>
    <div class="footer-col">
      <h4>Corporate</h4>
      <ul><?php
        $corp = get_posts([ 'post_type' => 'eps_service', 'tax_query' => [[ 'taxonomy' => 'service_type', 'field' => 'slug', 'terms' => 'corporate' ]], 'numberposts' => 6, 'orderby' => 'menu_order' ]);
        foreach ( $corp as $s ) echo '<li><a href="' . get_permalink($s->ID) . '">' . esc_html($s->post_title) . '</a></li>';
      ?></ul>
    </div>
    <div class="footer-col">
      <h4>Personal</h4>
      <ul><?php
        $pers = get_posts([ 'post_type' => 'eps_service', 'tax_query' => [[ 'taxonomy' => 'service_type', 'field' => 'slug', 'terms' => 'personal' ]], 'numberposts' => 6, 'orderby' => 'menu_order' ]);
        foreach ( $pers as $s ) echo '<li><a href="' . get_permalink($s->ID) . '">' . esc_html($s->post_title) . '</a></li>';
      ?></ul>
    </div>
    <div class="footer-col">
      <h4>Quick Links</h4>
      <ul>
        <li><a href="<?php echo esc_url( get_permalink( get_page_by_path('studio') ) ); ?>">Studio Rental</a></li>
        <li><a href="<?php echo esc_url( get_permalink( get_page_by_path('book') ) ); ?>">Book a Shoot</a></li>
        <li><a href="<?php echo esc_url( get_permalink( get_page_by_path('photographer-in-gurgaon') ) ); ?>">Photographer Gurgaon</a></li>
        <li><a href="<?php echo esc_url( get_permalink( get_page_by_path('videographer-in-gurgaon') ) ); ?>">Videographer Gurgaon</a></li>
        <li><a href="<?php echo esc_url( get_permalink( get_page_by_path('linkedin-headshot-photographer') ) ); ?>">LinkedIn Headshots</a></li>
      </ul>
    </div>
  </div>
  <div class="footer-bottom">
    <p>© <?php echo date('Y'); ?> Elegant Photo Studio — YTWC Pvt Ltd. All rights reserved.</p>
    <p><a href="<?php echo esc_url( home_url('/photographer-in-gurgaon') ); ?>" style="color:#333;font-size:.75rem">Photographer in Gurgaon</a></p>
  </div>
</footer>
<?php wp_footer(); ?>
</body>
</html>


<?php
/* ============================================================================
   FILE: index.php  (fallback — WordPress requires this)
============================================================================ */
?>
<?php get_header(); ?>
<div style="padding:8rem 2rem;text-align:center;max-width:600px;margin:0 auto">
  <h1 style="color:#fff;font-family:Georgia,serif;font-size:2rem;margin-bottom:1rem"><?php the_title(); ?></h1>
  <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); the_content(); endwhile; endif; ?>
</div>
<?php get_footer(); ?>


<?php
/* ============================================================================
   FILE: front-page.php  (Homepage — set as Static Front Page in WP Settings)
============================================================================ */
?>
<?php get_header(); ?>

<!-- SPLIT GATEWAY -->
<div class="split-hero">
  <a href="<?php echo esc_url( get_permalink( get_page_by_path('corporate') ) ); ?>" class="split-side">
    <?php
      $corp_img = get_theme_mod('eps_corp_hero_img');
      $fallback = get_template_directory_uri() . '/images/corporate-hero.jpg';
      echo '<img src="' . esc_url($corp_img ?: $fallback) . '" alt="Corporate Photography Gurgaon" loading="eager">';
    ?>
    <div class="split-overlay"></div>
    <div class="split-divider"></div>
    <div class="split-content">
      <div class="split-label">For Businesses</div>
      <h2 class="split-title">Corporate &<br>Commercial</h2>
      <p class="split-sub">Events, branding, advertising &amp; drone across Delhi NCR.</p>
      <div class="split-cta">Explore Services</div>
    </div>
  </a>

  <a href="<?php echo esc_url( get_permalink( get_page_by_path('personal') ) ); ?>" class="split-side">
    <?php
      $pers_img = get_theme_mod('eps_pers_hero_img');
      $fallback2 = get_template_directory_uri() . '/images/personal-hero.jpg';
      echo '<img src="' . esc_url($pers_img ?: $fallback2) . '" alt="Personal Photography Gurgaon" loading="eager">';
    ?>
    <div class="split-overlay"></div>
    <div class="split-content">
      <div class="split-label">For Individuals</div>
      <h2 class="split-title">Personal &<br>Private</h2>
      <p class="split-sub">Weddings, portraits, reels and family memories.</p>
      <div class="split-cta">Explore Services</div>
    </div>
  </a>

  <div class="hero-center">
    <div class="hero-center-brand">Welcome to</div>
    <div class="hero-center-name">ELEGANT PHOTO STUDIO</div>
    <div class="hero-center-line"></div>
    <div class="hero-center-location">GURGAON · DELHI NCR</div>
  </div>
  <div class="scroll-hint"><span>Scroll</span><i>↓</i></div>
</div>

<!-- STATS -->
<?php get_template_part('template-parts/stats'); ?>

<!-- FEATURED WORK -->
<div class="section-wrap">
  <div class="section-center">
    <div class="section-label">Our Work</div>
    <div class="section-title">Featured Photography</div>
  </div>
  <?php the_content(); // Add your gallery block via Gutenberg here ?>
</div>

<!-- STUDIO TEASER -->
<div class="studio-banner">
  <?php $studio_img = get_theme_mod('eps_studio_teaser'); ?>
  <img src="<?php echo esc_url($studio_img ?: get_template_directory_uri().'/images/studio-teaser.jpg'); ?>" alt="Studio Rental Gurgaon">
  <div class="studio-banner-overlay">
    <div class="studio-banner-label">Now Open · Rental Studio Gurgaon</div>
    <h2>Shoot at Our Studio</h2>
    <p>24ft Infinity White · Green Chroma · 15+ Setups · Makeup Room</p>
    <a href="<?php echo esc_url( get_permalink( get_page_by_path('studio') ) ); ?>" class="btn-gold">Explore Studio</a>
  </div>
</div>

<!-- REVIEWS -->
<?php get_template_part('template-parts/reviews'); ?>

<!-- BOOK CTA -->
<?php get_template_part('template-parts/book-cta'); ?>

<?php get_footer(); ?>


<?php
/* ============================================================================
   FILE: page-corporate.php  (assign this template to your "Corporate" page)
============================================================================ */
?>
<?php get_header(); ?>
<?php
$hero_img = get_theme_mod('eps_corp_hero_img', get_template_directory_uri().'/images/corporate-hero.jpg');
?>
<div class="page-hero">
  <img src="<?php echo esc_url($hero_img); ?>" alt="Corporate Photography Gurgaon">
  <div class="page-hero-overlay"></div>
  <div class="page-hero-content">
    <div class="page-hero-label">For Businesses</div>
    <h1>Corporate &amp; Commercial</h1>
    <p>Professional photography and videography for events, branding, advertising and drone services across Delhi NCR.</p>
  </div>
</div>

<?php get_template_part('template-parts/stats'); ?>

<div class="category-services-section">

  <?php
  $services = get_posts([
    'post_type'   => 'eps_service',
    'numberposts' => -1,
    'tax_query'   => [[ 'taxonomy' => 'service_type', 'field' => 'slug', 'terms' => 'corporate' ]],
    'orderby'     => 'menu_order',
    'order'       => 'ASC',
  ]);

  foreach ( $services as $svc ) :
    $price   = get_post_meta( $svc->ID, '_eps_price', true );
    $gal_ids = eps_get_gallery( $svc->ID, 8 );
    $thumb   = get_the_post_thumbnail_url( $svc->ID, 'eps-card' );
  ?>

  <div class="service-with-gallery">
    <div class="service-gallery-header">
      <div class="service-gallery-info">
        <h2><a href="<?php echo get_permalink($svc->ID); ?>" style="color:#fff;"><?php echo esc_html($svc->post_title); ?></a></h2>
        <?php if ($price) : ?><div class="price-tag"><?php echo esc_html($price); ?></div><?php endif; ?>
        <p><?php echo wp_trim_words($svc->post_excerpt ?: $svc->post_content, 20); ?></p>
        <a href="<?php echo get_permalink($svc->ID); ?>" class="btn-gold" style="margin-top:14px">View Details &amp; Book →</a>
      </div>
    </div>

    <?php if ( $thumb || $gal_ids ) : ?>
    <div class="mini-gallery">
      <?php if ($thumb) : ?>
        <a href="<?php echo get_permalink($svc->ID); ?>">
          <img src="<?php echo esc_url($thumb); ?>" alt="<?php echo esc_attr($svc->post_title); ?>" loading="lazy">
        </a>
      <?php endif; ?>
      <?php foreach ( $gal_ids as $img_id ) :
        $src = wp_get_attachment_image_src( $img_id, 'eps-thumb' );
        $full = wp_get_attachment_image_src( $img_id, 'full' );
        if (!$src) continue; ?>
        <a href="<?php echo esc_url($full[0]); ?>" target="_blank">
          <img src="<?php echo esc_url($src[0]); ?>" alt="<?php echo esc_attr($svc->post_title); ?>" loading="lazy">
        </a>
      <?php endforeach; ?>
    </div>
    <?php endif; ?>

    <hr class="gallery-divider">
  </div>

  <?php endforeach; ?>

</div>

<?php get_template_part('template-parts/book-cta'); ?>
<?php get_footer(); ?>


<?php
/* ============================================================================
   FILE: page-personal.php
============================================================================ */
?>
<?php get_header(); ?>
<?php $hero_img = get_theme_mod('eps_pers_hero_img', get_template_directory_uri().'/images/personal-hero.jpg'); ?>
<div class="page-hero">
  <img src="<?php echo esc_url($hero_img); ?>" alt="Personal Photography Gurgaon">
  <div class="page-hero-overlay"></div>
  <div class="page-hero-content">
    <div class="page-hero-label">For Individuals</div>
    <h1>Personal &amp; Private</h1>
    <p>Weddings, pre-weddings, portraits, reels and personal memories captured with artistry.</p>
  </div>
</div>

<?php get_template_part('template-parts/stats'); ?>

<div class="category-services-section">

  <?php
  $services = get_posts([
    'post_type'   => 'eps_service',
    'numberposts' => -1,
    'tax_query'   => [[ 'taxonomy' => 'service_type', 'field' => 'slug', 'terms' => 'personal' ]],
    'orderby'     => 'menu_order',
    'order'       => 'ASC',
  ]);

  foreach ( $services as $svc ) :
    $price   = get_post_meta( $svc->ID, '_eps_price', true );
    $gal_ids = eps_get_gallery( $svc->ID, 8 );
    $thumb   = get_the_post_thumbnail_url( $svc->ID, 'eps-card' );
  ?>

  <div class="service-with-gallery">
    <div class="service-gallery-header">
      <div class="service-gallery-info">
        <h2><a href="<?php echo get_permalink($svc->ID); ?>" style="color:#fff;"><?php echo esc_html($svc->post_title); ?></a></h2>
        <?php if ($price) : ?><div class="price-tag"><?php echo esc_html($price); ?></div><?php endif; ?>
        <p><?php echo wp_trim_words($svc->post_excerpt ?: $svc->post_content, 20); ?></p>
        <a href="<?php echo get_permalink($svc->ID); ?>" class="btn-gold" style="margin-top:14px">View Details &amp; Book →</a>
      </div>
    </div>

    <?php if ( $thumb || $gal_ids ) : ?>
    <div class="mini-gallery">
      <?php if ($thumb) : ?>
        <a href="<?php echo get_permalink($svc->ID); ?>">
          <img src="<?php echo esc_url($thumb); ?>" alt="<?php echo esc_attr($svc->post_title); ?>" loading="lazy">
        </a>
      <?php endif; ?>
      <?php foreach ( $gal_ids as $img_id ) :
        $src  = wp_get_attachment_image_src( $img_id, 'eps-thumb' );
        $full = wp_get_attachment_image_src( $img_id, 'full' );
        if (!$src) continue; ?>
        <a href="<?php echo esc_url($full[0]); ?>" target="_blank">
          <img src="<?php echo esc_url($src[0]); ?>" alt="<?php echo esc_attr($svc->post_title); ?>" loading="lazy">
        </a>
      <?php endforeach; ?>
    </div>
    <?php endif; ?>

    <hr class="gallery-divider">
  </div>

  <?php endforeach; ?>

</div>

<?php get_template_part('template-parts/book-cta'); ?>
<?php get_footer(); ?>


<?php
/* ============================================================================
   FILE: single-eps_service.php  (Individual service page with full gallery)
============================================================================ */
?>
<?php get_header(); the_post(); ?>
<?php
$price    = get_post_meta( get_the_ID(), '_eps_price', true );
$includes = eps_get_includes( get_the_ID() );
$gal_ids  = eps_get_gallery( get_the_ID() );
$hero_img = get_the_post_thumbnail_url( get_the_ID(), 'eps-hero' );
?>

<div class="page-hero">
  <?php if ($hero_img) : ?>
    <img src="<?php echo esc_url($hero_img); ?>" alt="<?php the_title_attribute(); ?>">
  <?php endif; ?>
  <div class="page-hero-overlay"></div>
  <div class="page-hero-content">
    <?php if ($price) : ?><div class="page-hero-label"><?php echo esc_html($price); ?></div><?php endif; ?>
    <h1><?php the_title(); ?></h1>
    <p><?php echo wp_trim_words(get_the_excerpt(), 25); ?></p>
    <a href="<?php echo esc_url( get_permalink( get_page_by_path('book') ) ); ?>" class="btn-gold">Book This Service</a>
  </div>
</div>

<div class="service-detail">
  <div class="service-detail-grid">

    <!-- Includes list -->
    <div>
      <div class="section-label">What's Included</div>
      <h2 class="font-serif" style="color:#fff;font-size:1.55rem;margin:0.5rem 0 1.5rem">Everything You Need</h2>
      <?php if ($includes) : ?>
        <ul class="includes-list">
          <?php foreach ($includes as $item) : ?>
            <li><?php echo esc_html($item); ?></li>
          <?php endforeach; ?>
        </ul>
      <?php endif; ?>

      <!-- Main post content (description, packages etc) -->
      <div style="margin-top:1.5rem;color:#bbb;font-size:0.88rem;line-height:1.8">
        <?php the_content(); ?>
      </div>

      <div style="display:flex;gap:12px;margin-top:2rem;flex-wrap:wrap">
        <a href="<?php echo esc_url( get_permalink( get_page_by_path('book') ) ); ?>" class="btn-gold">Book Now</a>
        <a href="https://wa.me/<?php echo esc_attr( eps_get_opt('eps_whatsapp') ?: '919990433318' ); ?>" target="_blank" class="btn-outline-gold">Get a Quote</a>
      </div>
    </div>

    <!-- Featured image -->
    <div>
      <?php if ($hero_img) : ?>
        <div class="service-main-img">
          <img src="<?php echo esc_url( get_the_post_thumbnail_url(get_the_ID(),'eps-card') ); ?>" alt="<?php the_title_attribute(); ?>">
        </div>
      <?php endif; ?>
    </div>

  </div>
</div>

<!-- FULL GALLERY -->
<?php if ($gal_ids) : ?>
<div class="service-gallery-section">
  <div style="max-width:1100px;margin:0 auto;padding:0 2rem">
    <h3 class="service-gallery-title">Our Work — <?php the_title(); ?></h3>
    <div class="service-gallery-grid">
      <?php foreach ($gal_ids as $img_id) :
        $src  = wp_get_attachment_image_src($img_id, 'eps-thumb');
        $full = wp_get_attachment_image_src($img_id, 'full');
        if (!$src) continue; ?>
        <a href="<?php echo esc_url($full[0]); ?>" target="_blank">
          <img src="<?php echo esc_url($src[0]); ?>" alt="<?php the_title_attribute(); ?>" loading="lazy">
        </a>
      <?php endforeach; ?>
    </div>
  </div>
</div>
<?php endif; ?>

<!-- Related services -->
<?php
$terms = get_the_terms( get_the_ID(), 'service_type' );
if ($terms && !is_wp_error($terms)) :
  $related = get_posts([
    'post_type'   => 'eps_service',
    'numberposts' => 3,
    'post__not_in'=> [ get_the_ID() ],
    'tax_query'   => [[ 'taxonomy' => 'service_type', 'field' => 'term_id', 'terms' => $terms[0]->term_id ]],
  ]);
  if ($related) : ?>
<div class="bg-dark-section">
  <div style="max-width:1100px;margin:0 auto">
    <h3 style="color:#fff;font-family:Georgia,serif;font-size:1.3rem;margin-bottom:2rem;text-align:center">You May Also Like</h3>
    <div class="services-grid">
      <?php foreach ($related as $r) :
        $rp = get_post_meta($r->ID,'_eps_price',true); ?>
        <div class="service-card">
          <a href="<?php echo get_permalink($r->ID); ?>">
            <div class="service-card-img">
              <?php if (has_post_thumbnail($r->ID)) : ?>
                <img src="<?php echo get_the_post_thumbnail_url($r->ID,'eps-card'); ?>" alt="<?php echo esc_attr($r->post_title); ?>" loading="lazy">
              <?php endif; ?>
              <div class="service-card-img-overlay"></div>
              <?php if ($rp) : ?><span class="service-price"><?php echo esc_html($rp); ?></span><?php endif; ?>
            </div>
            <div class="service-card-body">
              <div class="service-card-title"><?php echo esc_html($r->post_title); ?></div>
              <div class="service-card-sub"><?php echo wp_trim_words($r->post_excerpt,10); ?></div>
              <div class="service-card-link">View Details →</div>
            </div>
          </a>
        </div>
      <?php endforeach; ?>
    </div>
  </div>
</div>
  <?php endif;
endif; ?>

<?php get_template_part('template-parts/book-cta'); ?>
<?php get_footer(); ?>


<?php
/* ============================================================================
   FILE: page.php  (Generic page — also used for studio, booking, SEO pages)
============================================================================ */
?>
<?php get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="section-wrap" style="padding-top:5rem">
  <h1 style="color:#fff;font-family:Georgia,serif;font-size:2.2rem;margin-bottom:1.5rem"><?php the_title(); ?></h1>
  <div style="color:#bbb;line-height:1.9;font-size:0.95rem"><?php the_content(); ?></div>
</div>
<?php endwhile; ?>
<?php get_template_part('template-parts/book-cta'); ?>
<?php get_footer(); ?>


<?php
/* ============================================================================
   FILE: template-parts/stats.php  (Reusable stats bar)
============================================================================ */
?>
<div class="stats-bar">
  <div class="stats-inner">
    <?php
    $stats = [
      [ get_theme_mod('eps_stat1_n','2500+'), get_theme_mod('eps_stat1_l','Happy Clients') ],
      [ get_theme_mod('eps_stat2_n','600+'),  get_theme_mod('eps_stat2_l','Shoots Done') ],
      [ get_theme_mod('eps_stat3_n','10+'),   get_theme_mod('eps_stat3_l','Years Experience') ],
      [ 'Delhi NCR', 'Coverage Area' ],
    ];
    foreach ($stats as [$n,$l]) : ?>
      <div class="stat-item">
        <div class="stat-number"><?php echo esc_html($n); ?></div>
        <div class="stat-label"><?php echo esc_html($l); ?></div>
      </div>
    <?php endforeach; ?>
  </div>
</div>


<?php
/* ============================================================================
   FILE: template-parts/book-cta.php
============================================================================ */
?>
<div style="padding:0 2rem">
  <div class="book-cta">
    <div class="book-cta-label">Get Started</div>
    <h2>Ready to Create Something Beautiful?</h2>
    <p>Book your shoot online in 2 minutes. We'll confirm within 24 hours.</p>
    <div class="cta-buttons">
      <a href="<?php echo esc_url( get_permalink( get_page_by_path('book') ) ); ?>" class="btn-gold">Book a Shoot</a>
      <a href="https://wa.me/<?php echo esc_attr( eps_get_opt('eps_whatsapp') ?: '919990433318' ); ?>" target="_blank" class="btn-outline-gold">WhatsApp Us</a>
    </div>
  </div>
</div>


<?php
/* ============================================================================
   FILE: template-parts/reviews.php
   Add a custom page called "Reviews" or hardcode reviews here.
   TIP: Use a Review plugin like "WP Review Pro" or add reviews as pages.
============================================================================ */
?>
<div class="reviews-section">
  <div class="reviews-inner">
    <div class="reviews-header">
      <div>
        <div class="section-label">Client Reviews</div>
        <h2 class="font-serif" style="font-size:1.9rem">What Our Clients Say</h2>
        <div class="google-badge">
          <svg width="18" height="18" viewBox="0 0 24 24"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="#4285F4"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"/></svg>
          <span class="stars">★★★★★</span> <strong>4.9</strong> <span style="color:#555;font-size:.75rem">on Google</span>
        </div>
      </div>
      <a href="<?php echo esc_url( eps_get_opt('eps_greview') ?: '#' ); ?>" target="_blank" class="btn-outline-gold" style="display:flex;align-items:center;gap:8px">Write a Review</a>
    </div>
    <?php
    // Get review posts — create posts of type "review" or use Post type "page" with category "reviews"
    // Simplest: add reviews as pages with parent "Reviews"
    // OR use the Site Reviews plugin (free, recommended)
    // Below shows placeholder cards — replace with your review plugin shortcode:
    echo do_shortcode('[site_reviews assigned_posts="post_id" pagination="loadmore" hide="title" per_page="6"]');
    // If not using a plugin, add this shortcode text in a text block in the homepage Gutenberg editor
    ?>
    <p style="color:#555;font-size:.8rem;margin-top:1.5rem;text-align:center">
      💡 Install the free <strong style="color:#888">Site Reviews</strong> plugin to show Google-style review cards here.
    </p>
  </div>
</div>


<?php
/* ============================================================================
   FILE: js/main.js  (Vanilla JavaScript — no jQuery needed)
============================================================================ */
?>
(function() {
  // Sticky header
  var header = document.getElementById('site-header');
  window.addEventListener('scroll', function() {
    header.classList.toggle('scrolled', window.scrollY > 50);
  }, { passive: true });

  // Mobile menu toggle
  var toggle = document.getElementById('menu-toggle');
  var mobileNav = document.getElementById('mobile-nav');
  if (toggle && mobileNav) {
    toggle.addEventListener('click', function() {
      var open = mobileNav.style.display !== 'none';
      mobileNav.style.display = open ? 'none' : 'block';
      toggle.textContent = open ? '☰' : '✕';
    });
  }

  // Split homepage: CSS handles hover via :hover + sibling selector
  // Add touch support for mobile
  var sides = document.querySelectorAll('.split-side');
  sides.forEach(function(side) {
    side.addEventListener('touchstart', function() {
      sides.forEach(function(s) { s.classList.remove('touch-active'); });
      side.classList.add('touch-active');
    }, { passive: true });
  });

  // Service gallery setup/addon buttons (booking page)
  document.querySelectorAll('.setup-btn').forEach(function(btn) {
    btn.addEventListener('click', function() {
      document.querySelectorAll('.setup-btn').forEach(function(b) { b.classList.remove('active'); });
      btn.classList.add('active');
    });
  });
  document.querySelectorAll('.addon-btn').forEach(function(btn) {
    btn.addEventListener('click', function() { btn.classList.toggle('active'); });
  });
})();