<?php include 'header.php'; ?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Ad Details — View</title>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css" rel="stylesheet"/>
<script src="https://cdn.tailwindcss.com"></script>
<style>
:root{
  --ink:#0f0e17;--muted:#6b6b80;--line:#e8e8f0;
  --accent:#1d4ed8;--accent-light:#eff6ff;--accent-mid:#3b82f6;
  --surface:#f5f7fb;--white:#ffffff;
  --green:#16a34a;--green-light:#dcfce7;
  --amber:#d97706;--amber-light:#fef3c7;
  --cyan:#0891b2;--cyan-light:#cffafe;
  --red:#dc2626;--red-light:#fef2f2;
}
*{box-sizing:border-box;margin:0;padding:0;}
html,body{width:100%;overflow-x:hidden;}
body{font-family:'DM Sans',sans-serif;background:var(--surface);color:var(--ink);min-height:100vh;-webkit-font-smoothing:antialiased;line-height:1.5;font-size:14px;}

/* ── Page ── */
.page{max-width:1360px;width:100%;margin:0 auto;padding:clamp(12px,2vw,28px);}

/* ── Hero ── */
.hero{background:var(--white);border:1px solid var(--line);border-radius:22px;padding:clamp(20px,3vw,32px);margin-bottom:20px;position:relative;overflow:hidden;}
.hero::before{content:'';position:absolute;top:0;left:0;right:0;height:5px;background:linear-gradient(90deg,var(--accent) 0%,var(--accent-mid) 60%,#93c5fd 100%);}
.hero-inner{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;flex-wrap:wrap;}
.platform-logo{width:clamp(72px,10vw,100px);height:clamp(72px,10vw,100px);border-radius:20px;border:2px solid var(--line);background:var(--accent-light);display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;}
.platform-logo img{width:46px;height:46px;object-fit:contain;}
.status-dot{position:absolute;bottom:5px;right:5px;width:14px;height:14px;border-radius:50%;border:2px solid var(--white);}
.hero-info{flex:1;min-width:240px;}
.hero-name{font-family:'Playfair Display',serif;font-size:clamp(22px,4vw,30px);font-weight:700;color:var(--ink);line-height:1.2;margin-bottom:4px;}
.hero-sub{font-size:13px;color:var(--muted);margin-bottom:14px;}
.hero-pills{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:16px;}
.pill{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 11px;border-radius:18px;font-size:11px;font-weight:600;white-space:nowrap;}
.pill-blue{background:var(--accent-light);color:var(--accent);}
.pill-green{background:var(--green-light);color:var(--green);}
.pill-amber{background:var(--amber-light);color:var(--amber);}
.pill-cyan{background:var(--cyan-light);color:var(--cyan);}
.pill-gray{background:#f3f4f6;color:#374151;}
.pill-red{background:var(--red-light);color:var(--red);}
.hero-meta{display:flex;flex-wrap:wrap;gap:16px;}
.hero-meta-item{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);}
.hero-meta-item i{font-size:14px;color:var(--accent-mid);}
.hero-actions{display:flex;flex-direction:column;gap:8px;flex-shrink:0;}

/* ── Buttons ── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 15px;border-radius:10px;font-size:12px;font-weight:600;cursor:pointer;transition:all .18s ease;border:none;text-decoration:none;white-space:nowrap;}
.btn-ghost{background:transparent;border:1px solid var(--line);color:var(--muted);}
.btn-ghost:hover{border-color:var(--accent-mid);background:var(--accent-light);color:var(--accent);}
.btn-primary{background:var(--accent);color:#fff;box-shadow:0 4px 14px rgba(29,78,216,.22);}
.btn-primary:hover{background:#1e40af;}
.btn-danger{background:#fff5f5;border:1px solid #fecaca;color:#dc2626;}
.btn-danger:hover{background:#dc2626;color:#fff;}

/* ── Stats Bar ── */
.stats-bar{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:20px;}
.stat-card{background:var(--white);border:1px solid var(--line);border-radius:16px;padding:16px 18px;}
.stat-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:6px;}
.stat-value{font-size:22px;font-weight:700;color:var(--ink);line-height:1;}
.stat-value.blue{color:var(--accent);}
.stat-value.green{color:var(--green);}
.stat-value.amber{color:var(--amber);}
.stat-value.cyan{color:var(--cyan);}

/* ── Tabs ── */
.tabs-wrap{background:var(--white);border:1px solid var(--line);border-radius:16px;margin-bottom:18px;overflow:hidden;}
.tabs{display:flex;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:5px;gap:4px;}
.tabs::-webkit-scrollbar{display:none;}
.tab{display:inline-flex;align-items:center;gap:6px;padding:9px 16px;border-radius:10px;font-size:12px;font-weight:500;border:none;background:transparent;color:var(--muted);cursor:pointer;white-space:nowrap;transition:all .18s ease;flex-shrink:0;}
.tab i{font-size:14px;}
.tab.active{background:var(--accent-light);color:var(--accent);font-weight:600;}
.tab:not(.active):hover{background:#f4f4f6;color:var(--ink);}
.tab-content{display:none;}
.tab-content.active{display:block;}

/* ── Section Card ── */
.section-card{background:var(--white);border:1px solid var(--line);border-radius:18px;margin-bottom:18px;overflow:hidden;}
.section-head{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px;}
.section-head-icon{width:32px;height:32px;border-radius:9px;background:var(--accent-light);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.section-head-icon i{font-size:16px;color:var(--accent);}
.section-head-title{font-family:'Playfair Display',serif;font-size:15px;font-weight:600;color:var(--ink);}
.section-body{padding:20px;}
.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px 24px;}
.field-group{min-width:0;}
.field-label{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:4px;display:flex;align-items:center;gap:4px;}
.field-label i{font-size:11px;}
.field-value{font-size:14px;font-weight:500;color:var(--ink);line-height:1.5;word-break:break-word;}
.field-value.empty{color:#c7c9d1;font-style:italic;font-weight:400;}
.field-value a{color:var(--accent);text-decoration:none;}
.field-value a:hover{text-decoration:underline;}
.divider{border:none;border-top:1px solid var(--line);margin:18px 0;}
.sub-head{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);margin-bottom:14px;display:flex;align-items:center;gap:6px;}
.sub-head::after{content:'';flex:1;height:1px;background:var(--accent-light);}

/* ── Budget Card ── */
.budget-card{background:linear-gradient(135deg,var(--accent) 0%,#3b82f6 60%,#60a5fa 100%);border-radius:20px;padding:24px;color:#fff;position:relative;overflow:hidden;width:100%;max-width:380px;}
.budget-card::before{content:'';position:absolute;width:190px;height:190px;border-radius:50%;background:rgba(255,255,255,.07);top:-55px;right:-55px;}
.budget-card::after{content:'';position:absolute;width:130px;height:130px;border-radius:50%;background:rgba(255,255,255,.05);bottom:-35px;left:25px;}
.budget-icon{width:36px;height:36px;border-radius:10px;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;margin-bottom:16px;}
.budget-icon i{font-size:18px;}
.budget-label{font-size:10px;opacity:.75;text-transform:uppercase;letter-spacing:.06em;}
.budget-amount{font-size:28px;font-weight:700;letter-spacing:-0.5px;margin-top:4px;}
.budget-row{display:flex;justify-content:space-between;gap:10px;margin-top:18px;flex-wrap:wrap;}

/* ── Creative Preview ── */
.creative-zone{border:1.5px solid var(--line);border-radius:16px;overflow:hidden;background:#f8fafc;display:flex;align-items:center;justify-content:center;min-height:160px;cursor:pointer;transition:all .2s;}
.creative-zone:hover{border-color:var(--accent-mid);background:var(--accent-light);}
.creative-zone img{width:100%;max-height:260px;object-fit:cover;display:block;}

/* ── Ad Copy Block ── */
.ad-copy-block{background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:16px 18px;}
.ad-copy-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:6px;}
.ad-copy-text{font-size:14px;color:var(--ink);line-height:1.65;}
.ad-headline-text{font-size:18px;font-weight:700;color:var(--ink);line-height:1.3;}

/* ── Audience Tags ── */
.tag-cloud{display:flex;flex-wrap:wrap;gap:7px;}
.tag{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 12px;border-radius:20px;font-size:12px;font-weight:500;background:#f1f5f9;color:#334155;border:1px solid #e2e8f0;}

/* ── Progress Bar ── */
.progress-wrap{margin-top:6px;}
.progress-bar-bg{width:100%;height:6px;background:#e0e7ef;border-radius:99px;overflow:hidden;}
.progress-bar-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--accent),var(--accent-mid));}

/* ── Schedule Timeline ── */
.timeline-row{display:flex;align-items:center;gap:12px;padding:10px 0;}
.timeline-dot{width:10px;height:10px;border-radius:50%;background:var(--accent);flex-shrink:0;}
.timeline-dot.end{background:var(--green);}
.timeline-line{width:2px;height:28px;background:var(--line);margin-left:4px;}

/* ── Responsive ── */
@media(max-width:768px){
  .page{padding:12px;}
  .hero{padding:18px;border-radius:18px;}
  .hero-inner{flex-direction:column;gap:18px;}
  .hero-actions{width:100%;flex-direction:row;flex-wrap:wrap;}
  .hero-actions .btn{flex:1;min-width:100px;}
  .field-grid{grid-template-columns:1fr 1fr;gap:14px 16px;}
  .section-body{padding:16px;}
  .stats-bar{grid-template-columns:1fr 1fr;}
}
@media(max-width:520px){
  .page{padding:10px;}
  .hero{padding:16px;border-radius:16px;}
  .hero-name{font-size:22px;}
  .field-grid{grid-template-columns:1fr;}
  .section-head{padding:14px 16px;}
  .section-body{padding:14px;}
  .hero-actions{flex-direction:column;width:100%;}
  .hero-actions .btn{width:100%;}
  .stats-bar{grid-template-columns:1fr 1fr;}
  .budget-card{max-width:100%;}
}
</style>
</head>
<body>

<div class="max-w-[1800px] mx-auto mt-6 mb-5 px-4 flex items-center justify-between gap-3">
  <h1 class="text-[18px] sm:text-2xl font-bold text-black leading-tight">View Ad Details</h1>
</div>

<div class="page">

  <!-- ═══ HERO CARD ═══ -->
  <div class="hero">
    <div class="hero-inner">

      <!-- Platform Logo -->
      <div class="platform-logo">
        <img src="https://upload.wikimedia.org/wikipedia/commons/5/51/Facebook_f_logo_%282019%29.svg" alt="Facebook">
        <div class="status-dot" style="background:var(--green);"></div>
      </div>

      <!-- Info -->
      <div class="hero-info">
        <div class="hero-name">Brand Awareness Campaign</div>
        <div class="hero-sub">Facebook Ads &nbsp;·&nbsp; Brand Awareness &nbsp;·&nbsp; Image Ad</div>
        <div class="hero-pills">
          <span class="pill pill-green"><i class="ri-radio-button-fill" style="font-size:9px;"></i> Running</span>
          <span class="pill pill-blue"><i class="ri-megaphone-line"></i> Brand Awareness</span>
          <span class="pill pill-gray"><i class="ri-image-line"></i> Image Ad</span>
          <span class="pill pill-cyan"><i class="ri-currency-line"></i> INR</span>
        </div>
        <div class="hero-meta">
          <div class="hero-meta-item"><i class="ri-calendar-line"></i> Start: 01 Jun 2025</div>
          <div class="hero-meta-item"><i class="ri-calendar-check-line"></i> End: 30 Jun 2025</div>
          <div class="hero-meta-item"><i class="ri-money-rupee-circle-line"></i> Budget: ₹25,000</div>
          <div class="hero-meta-item"><i class="ri-map-pin-line"></i> Surat, Gujarat</div>
        </div>
      </div>

      <!-- Actions -->
      <div class="hero-actions">
        <a href="ads_management.php">
          <button class="btn btn-ghost"><i class="ri-arrow-left-line"></i> Back</button>
        </a>
        <a>
          <button class="btn btn-ghost"><i class="ri-edit-line"></i> Edit</button>
        </a>

        <button class="btn btn-danger"><i class="ri-delete-bin-line"></i> Delete</button>
      </div>

    </div>
  </div>

  <!-- ═══ STATS BAR ═══ -->
  <div class="stats-bar">
    <div class="stat-card">
      <div class="stat-label">Total Budget</div>
      <div class="stat-value blue">₹25,000</div>
    </div>
    <div class="stat-card">
      <div class="stat-label">Amount Spent</div>
      <div class="stat-value amber">₹12,450</div>
    </div>
    <div class="stat-card">
      <div class="stat-label">Reach</div>
      <div class="stat-value green">45.2K</div>
    </div>
    <div class="stat-card">
      <div class="stat-label">CTR</div>
      <div class="stat-value cyan">6.2%</div>
    </div>
    <div class="stat-card">
      <div class="stat-label">Performance</div>
      <div class="stat-value blue">78%</div>
      <div class="progress-wrap">
        <div class="progress-bar-bg" style="margin-top:8px;">
          <div class="progress-bar-fill" style="width:78%;"></div>
        </div>
      </div>
    </div>
  </div>

  <!-- ═══ TABS ═══ -->
  <div class="tabs-wrap">
    <div class="tabs">
      <button class="tab active" onclick="switchTab('basics',this)"><i class="ri-flag-line"></i> Campaign Basics</button>
      <button class="tab" onclick="switchTab('audience',this)"><i class="ri-group-line"></i> Audience</button>
      <button class="tab" onclick="switchTab('budget',this)"><i class="ri-wallet-3-line"></i> Budget & Schedule</button>
      <button class="tab" onclick="switchTab('creative',this)"><i class="ri-image-line"></i> Ad Creative</button>
    </div>
  </div>


  <!-- ════════════════════════════
       TAB 1 — CAMPAIGN BASICS
  ════════════════════════════ -->
  <div id="tab-basics" class="tab-content active">
    <div class="section-card">
      <div class="section-head">
        <div class="section-head-icon"><i class="ri-flag-line"></i></div>
        <div class="section-head-title">Campaign Information</div>
      </div>
      <div class="section-body">

        <div class="sub-head"><i class="ri-info-circle-line"></i> Basic Details</div>
        <div class="field-grid">
          <div class="field-group">
            <div class="field-label">Campaign Name</div>
            <div class="field-value">Brand Awareness Campaign</div>
          </div>
          <div class="field-group">
            <div class="field-label">Ad Platform</div>
            <div class="field-value" style="display:flex;align-items:center;gap:8px;">
              <img src="https://upload.wikimedia.org/wikipedia/commons/5/51/Facebook_f_logo_%282019%29.svg" style="width:16px;height:16px;">
              Facebook Ads
            </div>
          </div>
          <div class="field-group">
            <div class="field-label">Campaign Objective</div>
            <div class="field-value"><span class="pill pill-blue" style="font-size:13px;">Brand Awareness</span></div>
          </div>
          <div class="field-group">
            <div class="field-label">Ad Type</div>
            <div class="field-value"><span class="pill pill-gray" style="font-size:13px;">Image Ad</span></div>
          </div>
          <div class="field-group">
            <div class="field-label">Campaign Status</div>
            <div class="field-value"><span class="pill pill-green" style="font-size:13px;"><i class="ri-radio-button-fill" style="font-size:9px;"></i> Running</span></div>
          </div>
        </div>

        <hr class="divider"/>
        <div class="sub-head"><i class="ri-file-text-line"></i> Description</div>
        <div class="ad-copy-block">
          <div class="ad-copy-text">
            A brand awareness campaign targeting new users in Tier-1 cities of Gujarat to increase brand recall and reach for our Summer 2025 product line. The campaign focuses on visual storytelling with high-quality image creatives showcasing product benefits.
          </div>
        </div>

      </div>
    </div>
  </div>


  <!-- ════════════════════════════
       TAB 2 — AUDIENCE
  ════════════════════════════ -->
  <div id="tab-audience" class="tab-content">
    <div class="section-card">
      <div class="section-head">
        <div class="section-head-icon"><i class="ri-group-line"></i></div>
        <div class="section-head-title">Audience Targeting</div>
      </div>
      <div class="section-body">

        <div class="sub-head"><i class="ri-map-pin-line"></i> Location & Language</div>
        <div class="field-grid">
          <div class="field-group">
            <div class="field-label">Target Location</div>
            <div class="field-value">Surat, Gujarat, India</div>
          </div>
          <div class="field-group">
            <div class="field-label">Target Language</div>
            <div class="field-value">Gujarati, Hindi</div>
          </div>
        </div>

        <hr class="divider"/>
        <div class="sub-head"><i class="ri-user-heart-line"></i> Demographics</div>
        <div class="field-grid">
          <div class="field-group">
            <div class="field-label">Gender</div>
            <div class="field-value">All</div>
          </div>
          <div class="field-group">
            <div class="field-label">Age Range</div>
            <div class="field-value"><span class="pill pill-blue" style="font-size:13px;">25–34</span></div>
          </div>
          <div class="field-group">
            <div class="field-label">Device Type</div>
            <div class="field-value">Mobile Only</div>
          </div>
          <div class="field-group">
            <div class="field-label">Audience Type</div>
            <div class="field-value"><span class="pill pill-cyan" style="font-size:13px;">Cold Audience</span></div>
          </div>
        </div>

        <hr class="divider"/>
        <div class="sub-head"><i class="ri-price-tag-3-line"></i> Interests & Segments</div>
        <div class="field-group" style="margin-bottom:14px;">
          <div class="field-label" style="margin-bottom:8px;">Interests / Keywords</div>
          <div class="tag-cloud">
            <span class="tag"><i class="ri-shopping-bag-line" style="font-size:11px;"></i> Fashion</span>
            <span class="tag"><i class="ri-star-line" style="font-size:11px;"></i> Lifestyle</span>
            <span class="tag"><i class="ri-smartphone-line" style="font-size:11px;"></i> Online Shopping</span>
            <span class="tag"><i class="ri-heart-line" style="font-size:11px;"></i> Beauty</span>
          </div>
        </div>
        <div class="field-group">
          <div class="field-label">Custom Audience / Segment</div>
          <div class="field-value">Summer Sale Segment 2025</div>
        </div>

      </div>
    </div>
  </div>


  <!-- ════════════════════════════
       TAB 3 — BUDGET & SCHEDULE
  ════════════════════════════ -->
  <div id="tab-budget" class="tab-content">
    <div class="section-card">
      <div class="section-head">
        <div class="section-head-icon"><i class="ri-wallet-3-line"></i></div>
        <div class="section-head-title">Budget & Schedule</div>
      </div>
      <div class="section-body">

        <div style="display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start;margin-bottom:24px;">

          <!-- Budget Visual Card -->
          <div class="budget-card" style="flex:0 0 auto;width:100%;max-width:340px;">
            <div class="budget-icon"><i class="ri-wallet-3-line"></i></div>
            <div class="budget-label">Total Campaign Budget</div>
            <div class="budget-amount">₹25,000</div>
            <div class="budget-row">
              <div>
                <div class="budget-label">Daily Cap</div>
                <div style="font-size:15px;font-weight:600;margin-top:2px;">₹1,000 / day</div>
              </div>
              <div style="text-align:right;">
                <div class="budget-label">Spent So Far</div>
                <div style="font-size:15px;font-weight:600;margin-top:2px;">₹12,450</div>
              </div>
            </div>
          </div>

          <!-- Budget Details -->
          <div style="flex:1;min-width:220px;">
            <div class="field-grid" style="grid-template-columns:repeat(auto-fill,minmax(180px,1fr));">
              <div class="field-group">
                <div class="field-label">Budget Type</div>
                <div class="field-value">Lifetime Budget</div>
              </div>
              <div class="field-group">
                <div class="field-label">Bid Strategy</div>
                <div class="field-value">Lowest Cost</div>
              </div>
              <div class="field-group">
                <div class="field-label">Bid Amount</div>
                <div class="field-value">₹0.85 / click</div>
              </div>
              <div class="field-group">
                <div class="field-label">Currency</div>
                <div class="field-value"><span class="pill pill-cyan" style="font-size:13px;">INR</span></div>
              </div>
              <div class="field-group">
                <div class="field-label">Frequency Cap</div>
                <div class="field-value">3 impressions / user</div>
              </div>
            </div>
          </div>

        </div>

        <hr class="divider"/>
        <div class="sub-head"><i class="ri-calendar-line"></i> Campaign Schedule</div>
        <div style="padding-left:4px;">
          <div class="timeline-row">
            <div class="timeline-dot"></div>
            <div>
              <div style="font-size:11px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.05em;">Start Date</div>
              <div style="font-size:14px;font-weight:600;color:var(--ink);">01 June 2025</div>
            </div>
          </div>
          <div class="timeline-line"></div>
          <div class="timeline-row">
            <div class="timeline-dot end"></div>
            <div>
              <div style="font-size:11px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.05em;">End Date</div>
              <div style="font-size:14px;font-weight:600;color:var(--ink);">30 June 2025</div>
            </div>
          </div>
        </div>

        <!-- Budget consumed bar -->
        <div style="margin-top:20px;">
          <div style="display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:6px;">
            <span>Budget Consumed</span>
            <span style="font-weight:600;color:var(--ink);">₹12,450 / ₹25,000 (49.8%)</span>
          </div>
          <div class="progress-bar-bg">
            <div class="progress-bar-fill" style="width:49.8%;"></div>
          </div>
        </div>

      </div>
    </div>
  </div>


  <!-- ════════════════════════════
       TAB 4 — AD CREATIVE
  ════════════════════════════ -->
  <div id="tab-creative" class="tab-content">

    <div style="display:grid;grid-template-columns:1fr 1fr;gap:18px;">

      <!-- Left — Copy -->
      <div class="section-card" style="margin-bottom:0;">
        <div class="section-head">
          <div class="section-head-icon"><i class="ri-text"></i></div>
          <div class="section-head-title">Ad Copy</div>
        </div>
        <div class="section-body" style="display:flex;flex-direction:column;gap:14px;">

          <div class="ad-copy-block">
            <div class="ad-copy-label">Headline</div>
            <div class="ad-headline-text">Discover Summer 2025 — Fresh Looks, Unbeatable Prices</div>
          </div>

          <div class="ad-copy-block">
            <div class="ad-copy-label">Primary Text / Ad Copy</div>
            <div class="ad-copy-text">Step into summer with our all-new collection. From bold prints to breezy pastels — find your perfect style at prices that make you smile. Limited time offer. Shop now and get flat 20% off on orders above ₹999!</div>
          </div>

          <div class="ad-copy-block">
            <div class="ad-copy-label">Ad Description</div>
            <div class="ad-copy-text">Shop the Summer 2025 collection. Free delivery above ₹499. Easy returns.</div>
          </div>

          <hr class="divider" style="margin:4px 0;"/>

          <div class="field-grid" style="grid-template-columns:1fr 1fr;">
            <div class="field-group">
              <div class="field-label">CTA Button</div>
              <div class="field-value">
                <span style="display:inline-flex;align-items:center;gap:6px;padding:6px 14px;background:var(--accent);color:#fff;border-radius:8px;font-size:12px;font-weight:600;">
                  <i class="ri-shopping-bag-line"></i> Shop Now
                </span>
              </div>
            </div>
            <div class="field-group">
              <div class="field-label">Ad Format / Placement</div>
              <div class="field-value"><span class="pill pill-gray" style="font-size:13px;">Feed</span></div>
            </div>
          </div>

          <div class="field-group">
            <div class="field-label">Destination URL</div>
            <div class="field-value"><a href="#">https://www.yourstore.com/summer-2025</a></div>
          </div>
          <div class="field-group">
            <div class="field-label">Display URL</div>
            <div class="field-value">yourstore.com/summer</div>
          </div>

        </div>
      </div>

      <!-- Right — Creative Media -->
      <div class="section-card" style="margin-bottom:0;">
        <div class="section-head">
          <div class="section-head-icon"><i class="ri-image-line"></i></div>
          <div class="section-head-title">Creative Media</div>
        </div>
        <div class="section-body">

          <div class="creative-zone" onclick="openCreativeModal()">
            <img src="https://images.unsplash.com/photo-1490481651871-ab68de25d43d?w=800&q=80" alt="Ad Creative">
          </div>

          <div style="margin-top:12px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;">
            <div>
              <div style="font-size:12px;font-weight:600;color:var(--ink);">summer_campaign_hero.jpg</div>
              <div style="font-size:11px;color:var(--muted);">Image · 1.2 MB · 1200×628 px</div>
            </div>
            <button class="btn btn-ghost" style="gap:5px;" onclick="openCreativeModal()">
              <i class="ri-zoom-in-line"></i> Preview
            </button>
          </div>

          <hr class="divider"/>

          <!-- Ad Preview Mockup -->
          <div style="background:#f0f2f5;border-radius:14px;padding:14px;border:1px solid var(--line);">
            <div style="font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:10px;">Ad Preview (Feed)</div>
            <!-- Fake Facebook post -->
            <div style="background:#fff;border-radius:10px;overflow:hidden;border:1px solid #e4e6ea;">
              <div style="padding:10px 12px;display:flex;align-items:center;gap:8px;">
                <div style="width:34px;height:34px;border-radius:50%;background:var(--accent-light);display:flex;align-items:center;justify-content:center;">
                  <img src="https://upload.wikimedia.org/wikipedia/commons/5/51/Facebook_f_logo_%282019%29.svg" style="width:18px;height:18px;" alt="">
                </div>
                <div>
                  <div style="font-size:12px;font-weight:700;color:#1c1e21;">Your Brand</div>
                  <div style="font-size:10px;color:#65676b;">Sponsored · <i class="ri-earth-line" style="font-size:10px;"></i></div>
                </div>
              </div>
              <div style="padding:0 12px 8px;font-size:12px;color:#1c1e21;line-height:1.5;">Step into summer with our all-new collection...</div>
              <img src="https://images.unsplash.com/photo-1490481651871-ab68de25d43d?w=600&q=70" style="width:100%;display:block;max-height:160px;object-fit:cover;" alt="">
              <div style="padding:8px 12px;background:#f0f2f5;display:flex;align-items:center;justify-content:space-between;">
                <div>
                  <div style="font-size:11px;font-weight:700;color:#1c1e21;">Discover Summer 2025</div>
                  <div style="font-size:10px;color:#65676b;">yourstore.com/summer</div>
                </div>
                <div style="background:var(--accent);color:#fff;padding:6px 12px;border-radius:6px;font-size:11px;font-weight:700;white-space:nowrap;">Shop Now</div>
              </div>
            </div>
          </div>

        </div>
      </div>

    </div>
  </div>

</div><!-- /page -->


<!-- Creative Preview Modal -->
<div id="creativeModal" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.8);z-index:9999;align-items:center;justify-content:center;padding:20px;">
  <div style="position:relative;max-width:90%;max-height:90%;">
    <button onclick="closeCreativeModal()"
      style="position:absolute;top:-45px;right:0;background:#fff;border:none;width:38px;height:38px;border-radius:50%;cursor:pointer;font-size:20px;font-weight:bold;">×</button>
    <img src="https://images.unsplash.com/photo-1490481651871-ab68de25d43d?w=1200&q=90"
      style="max-width:100%;max-height:85vh;border-radius:14px;background:#fff;padding:6px;object-fit:contain;">
  </div>
</div>

<script>
function switchTab(name, el) {
  document.querySelectorAll('.tab-content').forEach(t => t.classList.remove('active'));
  document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
  document.getElementById('tab-' + name).classList.add('active');
  el.classList.add('active');
}

function openCreativeModal() {
  document.getElementById('creativeModal').style.display = 'flex';
}
function closeCreativeModal() {
  document.getElementById('creativeModal').style.display = 'none';
}
document.getElementById('creativeModal').addEventListener('click', function(e){
  if (e.target === this) closeCreativeModal();
});
</script>

</body>
</html>

<?php include 'footer.php'; ?>