/* Dark Empires — Product detail page */

body.product-page {
    font-family: 'Roboto', system-ui, sans-serif;
    background: var(--bg);
    min-height: 100vh;
}

@keyframes tick-appear {
    0%   { transform: scale(0);   opacity: 0; }
    50%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}
@keyframes slide-in {
    0%   { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}
@keyframes fade-in {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

.tick-animation { animation: tick-appear 0.3s ease-out forwards; }
.slide-in       { animation: slide-in    0.6s ease-out forwards; }
.fade-in        { animation: fade-in     0.3s ease-out forwards; }
.transition-all { transition: all 0.3s ease; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.container-enhanced {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.container-enhanced:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Price area */
.price-container {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.price-subcontainer {
    display: flex;
    align-items: baseline;
    gap: 3px;
}
.discount-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Cart button */
.cart-btn-container { position: relative; }
.cart-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}
.cart-btn:hover { transform: translateY(-2px); }

.tick-overlay {
    position: absolute;
    top: -6px; right: -6px;
    background: #10b981;
    color: #fff;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Integration */
.integration-link {
    color: var(--primary);
    cursor: pointer;
}
.integration-icon {
    margin-left: 6px;
    transition: transform 0.2s ease;
}
.integration-link:hover .integration-icon { transform: translateX(4px); }
.integration-link:hover { color: var(--primary-hover); }

/* ──────────────────────────────────────────────────────────
   Hero product image — large, centered on dark mesh gradient.
   Normalises visual weight regardless of original logo size.
   ────────────────────────────────────────────────────────── */
.product-hero-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(circle at 25% 15%, rgba(99,102,241,0.30), transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(236,72,153,0.20), transparent 55%),
        linear-gradient(135deg, #1e1b4b 0%, #0f172a 55%, #020617 100%);
}
.product-hero-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 50%, rgba(0,0,0,0.40) 100%);
    pointer-events: none;
    z-index: 0;
}
.product-hero-image {
    position: relative;
    z-index: 1;
    max-width: 70%;
    max-height: 70%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.55));
    transition: transform 0.35s ease;
}
.product-hero-wrap:hover .product-hero-image { transform: scale(1.06); }

.product-hero-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.product-hero-fallback span {
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow:
        0 2px 8px  rgba(0,0,0,0.65),
        0 0 24px   rgba(147,197,253,0.45);
}

/* ──────────────────────────────────────────────────────────
   Similar APIs carousel image — smaller version of hero.
   ────────────────────────────────────────────────────────── */
.carousel-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(99,102,241,0.22), transparent 60%),
        linear-gradient(135deg, #1e1b4b 0%, #0f172a 55%, #020617 100%);
}
.carousel-image {
    max-width: 78%;
    max-height: 78%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.40));
    transition: transform 0.3s ease;
}
.carousel-item:hover .carousel-image { transform: scale(1.08); }

.carousel-image-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}
.carousel-image-fallback span {
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.15;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Carousel */
.carousel {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
}
.carousel-item {
    flex: 0 0 auto;
    width: 220px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.carousel-item .content { padding: 12px; }

/* Action bar (desktop) */
.action-bar {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

/* Cart badge on header */
.cart-badge-container { position: relative; }

/* ─── Cart toast ─── */
@keyframes toast-in {
    0%   { transform: translate(-50%, -20px); opacity: 0; }
    100% { transform: translate(-50%, 0);     opacity: 1; }
}
.cart-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1.1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(16,185,129,0.40), 0 2px 8px rgba(0,0,0,0.15);
    animation: toast-in 0.35s cubic-bezier(.2,.9,.3,1) both;
}
.cart-toast i { font-size: 1.05rem; }
.cart-toast-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
    white-space: nowrap;
}
.cart-toast-link:hover { opacity: 0.85; }

/* ─────────────────────────────────────────────────────────────
   Mobile sticky buy bar — premium glass / dark-gradient treatment.
   Slides up on load, safe-area aware for iPhone home-indicator.
   ───────────────────────────────────────────────────────────── */
@keyframes mbb-slide-up {
    0%   { transform: translateY(110%); opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}
@keyframes mbb-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.mobile-buy-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background:
        radial-gradient(circle at 15% 0%, rgba(99,102,241,0.22), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(236,72,153,0.18), transparent 55%),
        linear-gradient(180deg, rgba(15,23,42,0.92) 0%, rgba(2,6,23,0.96) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 -8px 32px rgba(0,0,0,0.45),
        0 -1px 0 rgba(255,255,255,0.04) inset;
    animation: mbb-slide-up 0.45s cubic-bezier(.2,.9,.3,1) both;
}

/* Subtle top accent line */
.mobile-buy-bar::before {
    content: "";
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(99,102,241,0.6),
        rgba(236,72,153,0.6),
        transparent);
    opacity: 0.7;
}

/* Qty control — dark pill with frosted inner feel */
.mobile-buy-bar .qty-ctrl {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 9999px;
    padding: 0.3rem 0.5rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.mobile-buy-bar .qty-ctrl button {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.mobile-buy-bar .qty-ctrl button:hover,
.mobile-buy-bar .qty-ctrl button:active {
    background: rgba(255,255,255,0.16);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
    transform: scale(1.05);
}
.mobile-buy-bar .qty-ctrl span {
    min-width: 26px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    letter-spacing: 0.02em;
}

/* Shared button base */
.mobile-buy-bar .btn-cart,
.mobile-buy-bar .btn-buy {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 0.7rem 0.5rem;
    border-radius: 9999px;
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    gap: 0.45rem;
    transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.mobile-buy-bar .btn-cart::after,
.mobile-buy-bar .btn-buy::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg,
        transparent 20%,
        rgba(255,255,255,0.35) 50%,
        transparent 80%);
    background-size: 200% 100%;
    mix-blend-mode: overlay;
    animation: mbb-shimmer 3.2s linear infinite;
    pointer-events: none;
    opacity: 0.55;
}
.mobile-buy-bar .btn-cart:active,
.mobile-buy-bar .btn-buy:active { transform: scale(0.97); }

/* Add-to-Cart — indigo → violet gradient */
.mobile-buy-bar .btn-cart {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    box-shadow:
        0 6px 20px rgba(99,102,241,0.45),
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 -1px 0 rgba(230, 223, 223, 0.2) inset;
}
.mobile-buy-bar .btn-cart:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(99,102,241,0.55); }
.mobile-buy-bar .btn-cart i { font-size: 0.95rem; }

/* Buy Now — emerald → lime gradient, slightly louder */
.mobile-buy-bar .btn-buy {
    background: linear-gradient(135deg, #10b981 0%, #22c55e 55%, #84cc16 100%);
    box-shadow:
        0 6px 20px rgba(34,197,94,0.50),
        0 1px 0 rgba(255,255,255,0.22) inset,
        0 -1px 0 rgba(249, 246, 246, 0.2) inset;
}
.mobile-buy-bar .btn-buy:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(34,197,94,0.60); }

/* Push page content above bar on mobile */
@media (max-width: 767px) {
    body.product-page {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }
}
