import type { Metadata } from 'next'
import InternalPageTemplate from '@/components/InternalPageTemplate'
import BreadcrumbJsonLd from '@/components/BreadcrumbJsonLd'
import Link from 'next/link'
import { getTranslations } from 'next-intl/server'
import { buildAlternates } from '@/lib/seo'

export async function generateMetadata({
  params,
}: {
  params: Promise<{ locale: string }>
}): Promise<Metadata> {
  const { locale } = await params
  const t = await getTranslations('seo')
  const { canonical, languages } = buildAlternates(locale, '/guides/booking-com-prices-by-country')
  return {
    title: t('guideBookingCom'),
    description:
      'Booking.com shows different hotel prices to users based on their country. Price gaps of up to 40% are common. Here\'s what the data shows and how to pay less.',
    openGraph: {
      title: 'Booking.com Prices by Country: How Much You Could Be Overpaying',
      description:
        'The same hotel on Booking.com can cost 10–40% more depending on which country you search from. Here\'s how it works and how to find the cheaper rate.',
      type: 'article',
    },
    alternates: { canonical, languages },
  }
}

const articleSchema = {
  '@context': 'https://schema.org',
  '@type': 'Article',
  headline: 'Booking.com Prices by Country: How Much You Could Be Overpaying',
  description:
    'Booking.com shows different hotel prices to users based on their country. Price gaps of up to 40% are common.',
  author: { '@type': 'Organization', name: 'CahooTravel' },
  publisher: {
    '@type': 'Organization',
    name: 'CahooTravel',
    logo: { '@type': 'ImageObject', url: 'https://www.cahootravel.com/cahootravel-logo.svg' },
  },
  datePublished: '2025-01-15',
  dateModified: '2025-01-15',
  mainEntityOfPage: 'https://www.cahootravel.com/guides/booking-com-prices-by-country',
}

export default function BookingComPricesGuide() {
  return (
    <InternalPageTemplate>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(articleSchema) }}
      />

      <article className="max-w-3xl">
        <div className="mb-10">
          <div className="flex items-center gap-3 mb-4">
            <span className="text-xs font-medium text-brand-purple bg-brand-purple-light px-2.5 py-1 rounded-full">
              Platform Deep-Dive
            </span>
            <span className="text-xs text-gray-400">6 min read</span>
          </div>
          <h1 className="text-4xl font-bold text-gray-900 mb-4 leading-tight">
            Booking.com Prices by Country: How Much You Could Be Overpaying
          </h1>
          <p className="text-gray-500 text-lg leading-relaxed">
            Booking.com is the world&apos;s largest online hotel platform — used by over 500 million
            travellers a year. What most of those travellers don&apos;t know is that the price they
            see for any given hotel depends heavily on the country they are searching from. Price
            differences of 20–40% on the same room, same night are not unusual.
          </p>
        </div>

        {/* Featured image */}
        <div className="mb-10 rounded-2xl overflow-hidden aspect-[16/7]">
          <img
            src="/guides/booking-com-prices.jpg"
            alt="Laptop open for hotel price comparison on Booking.com"
            className="w-full h-full object-cover"
          />
        </div>

        <div className="prose prose-gray max-w-none text-sm leading-relaxed space-y-8">

          <section>
            <h2 className="text-2xl font-bold text-gray-900 mb-3">
              How Booking.com prices the same room differently by country
            </h2>
            <p className="text-gray-600">
              Booking.com uses a combination of demand-based pricing, market segmentation, and
              localised promotions to determine what each user sees. At its core, the system
              recognises that travellers from different countries have different price sensitivities
              and willingness to pay.
            </p>
            <p className="text-gray-600 mt-3">
              The platform displays prices in the local currency of the viewer by default, but the
              underlying price in a base currency (usually EUR or USD) is also different — it is not
              just a currency conversion. A hotel in Barcelona priced at €120 for a US viewer may
              genuinely cost only €95 when viewed from Spain or Mexico. Both prices are in EUR; one
              is simply higher because the algorithm expects more from that market segment.
            </p>
          </section>

          <section>
            <h2 className="text-2xl font-bold text-gray-900 mb-3">
              Price examples across popular destinations
            </h2>
            <p className="text-gray-600">
              To understand the scale of geo-pricing on Booking.com, consider these representative
              destination comparisons. These reflect patterns consistently observed across multiple
              searches, not one-off anomalies.
            </p>

            <div className="space-y-6 mt-4">
              <div>
                <h3 className="text-base font-semibold text-gray-900 mb-2">Tokyo, Japan</h3>
                <p className="text-gray-600 text-sm">
                  Japan is one of the clearest examples of Booking.com geo-pricing. The platform
                  competes with domestic booking sites like Jalan and Rakuten Travel, so it often
                  prices aggressively for users browsing with Japanese IP addresses. Users from
                  Western Europe and North America regularly see prices 25–40% higher than users
                  browsing from Japan or nearby Asian countries.
                </p>
              </div>
              <div>
                <h3 className="text-base font-semibold text-gray-900 mb-2">Bali, Indonesia</h3>
                <p className="text-gray-600 text-sm">
                  Bali is a high-demand destination with a strong mix of budget and luxury inventory.
                  Users from Australia (a huge source market for Bali) often see higher prices than
                  users from Southeast Asia. Price differences of 15–30% are typical for mid-range
                  properties.
                </p>
              </div>
              <div>
                <h3 className="text-base font-semibold text-gray-900 mb-2">London, United Kingdom</h3>
                <p className="text-gray-600 text-sm">
                  For European destinations like London, the geo-pricing effect is often smaller
                  within Europe (5–15%) but more pronounced for users from the US, Canada, and
                  Australia, who can pay 20–30% more for the same central London hotel.
                </p>
              </div>
              <div>
                <h3 className="text-base font-semibold text-gray-900 mb-2">New York City, USA</h3>
                <p className="text-gray-600 text-sm">
                  Interestingly, US domestic hotels sometimes show higher prices to US IP addresses
                  than to users browsing from Europe or Latin America — particularly for business
                  hotels in major cities. The logic: corporate US travellers book at higher rates,
                  so the algorithm charges accordingly.
                </p>
              </div>
            </div>
          </section>

          <section>
            <h2 className="text-2xl font-bold text-gray-900 mb-3">
              Which countries tend to see the cheapest Booking.com prices?
            </h2>
            <p className="text-gray-600">
              There is no single &quot;cheapest country&quot; for Booking.com that works for all hotels.
              The answer depends on the destination. However, some patterns hold consistently:
            </p>
            <ul className="list-disc pl-5 space-y-2 text-gray-600 mt-3">
              <li>
                <strong>Searching from the destination country</strong> often yields the lowest
                price. Booking.com wants to convert local browsers who have many alternatives
                (domestic sites, walk-in bookings, etc.).
              </li>
              <li>
                <strong>Asian markets</strong> (India, Indonesia, Vietnam, Philippines) often see
                lower prices for Asian-destination hotels due to strong regional competition.
              </li>
              <li>
                <strong>Eastern European markets</strong> (Poland, Czech Republic, Romania) sometimes
                see lower prices for European hotels, though this gap has narrowed as those countries&apos;
                incomes have risen.
              </li>
            </ul>
          </section>

          <section>
            <h2 className="text-2xl font-bold text-gray-900 mb-3">
              How to check if you are overpaying on a specific Booking.com hotel
            </h2>
            <p className="text-gray-600">
              The process for finding the cheapest country price for any hotel on Booking.com is
              straightforward with the right tool:
            </p>
            <ol className="list-decimal pl-5 space-y-2 text-gray-600 mt-3">
              <li>Go to Booking.com and find the hotel you want to book.</li>
              <li>Copy the hotel&apos;s URL from your browser.</li>
              <li>Paste it into CahooTravel and run a search.</li>
              <li>
                CahooTravel fetches the hotel page from 100+ country contexts simultaneously and
                returns a price comparison showing which country sees the cheapest rate and by how
                much.
              </li>
              <li>Book directly on Booking.com — no account changes, no VPN, no workarounds.</li>
            </ol>
            <p className="text-gray-600 mt-3">
              The free plan allows a single-country comparison. Paid plans show the full multi-country
              breakdown, which is where the biggest savings are typically found.
            </p>
          </section>

          <section>
            <h2 className="text-2xl font-bold text-gray-900 mb-3">
              Does Booking.com allow this?
            </h2>
            <p className="text-gray-600">
              Viewing public prices from multiple country contexts is not against Booking.com&apos;s
              terms of service. The prices shown are publicly available to anyone browsing the
              platform. CahooTravel simply automates what you could do manually — checking the same
              hotel from multiple locations — and shows you the result in one place.
            </p>
            <p className="text-gray-600 mt-3">
              Booking platforms are aware that price-conscious travellers compare across regions.
              Some have even started offering &quot;best price guarantee&quot; policies, though these typically
              compare prices within the same market, not across country contexts.
            </p>
          </section>

          <div className="rounded-2xl bg-brand-purple text-white p-8 flex flex-col md:flex-row items-center justify-between gap-6 mt-4">
            <div>
              <h3 className="text-lg font-bold mb-1">Check your Booking.com hotel now</h3>
              <p className="text-purple-200 text-sm">
                Paste any Booking.com URL and see how much cheaper it is in other countries. Free to start.
              </p>
            </div>
            <Link
              href="/"
              className="flex-shrink-0 bg-brand-yellow hover:bg-brand-yellow-dark text-gray-900 font-medium text-sm px-6 py-2.5 rounded-md transition-colors whitespace-nowrap"
            >
              Check prices →
            </Link>
          </div>
        </div>
      </article>

      <BreadcrumbJsonLd
        items={[
          { name: 'Guides', path: '/guides' },
          { name: 'Booking.com Prices by Country' },
        ]}
      />
    </InternalPageTemplate>
  )
}
