/* ============================================================
   FrozenSips — Cocktail detail page (cocktail.cfm)
   Standalone stylesheet: loads AFTER css/frozensips.css and only
   styles cd-* namespaced classes so it never fights other sheets.
   ============================================================ */

:root {
    --cd-gold: #ffd76a;
    --cd-gold-2: #ff9d5a;
    --cd-ink: #d9e1f5;
}

/* ---------- Entrance animation ---------- */
@keyframes cdRise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .cd-hero__copy > *, .cd-hero__photo { animation: none !important; }
}

/* ---------- Immersive hero ---------- */
.cd-hero {
    position: relative;
    overflow: hidden;
    padding: 28px 24px 10px;
}
.cd-hero__backdrop {
    position: absolute;
    inset: -60px;
    z-index: 0;
}
.cd-hero__backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    filter: blur(48px) saturate(1.5) brightness(0.42);
}
.cd-hero__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(106, 141, 255, 0.28), transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(255, 90, 180, 0.18), transparent 45%),
        linear-gradient(180deg, rgba(7, 17, 31, 0.55) 0%, rgba(7, 17, 31, 0.35) 45%, var(--bg) 100%);
}
.cd-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 18px;
}
.cd-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    padding: 26px 0 46px;
}
.cd-hero__copy > * { animation: cdRise 0.55s ease both; }
.cd-hero__copy > *:nth-child(2) { animation-delay: 0.06s; }
.cd-hero__copy > *:nth-child(3) { animation-delay: 0.12s; }
.cd-hero__copy > *:nth-child(4) { animation-delay: 0.18s; }
.cd-hero__copy > *:nth-child(5) { animation-delay: 0.24s; }
.cd-hero__copy > *:nth-child(6) { animation-delay: 0.30s; }

.cd-title {
    margin: 0 0 14px;
    font-size: clamp(2.6rem, 5.5vw, 4.4rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    background: linear-gradient(115deg, #ffffff 35%, #9ec1ff 75%, #ff8ecf 105%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.cd-lede {
    max-width: 560px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

/* Star rating driven by --rating (0–5) */
.cd-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cd-stars {
    --rating: 0;
    font-size: 1.35rem;
    letter-spacing: 3px;
    line-height: 1;
}
.cd-stars::before {
    content: "\2605\2605\2605\2605\2605";
    background: linear-gradient(90deg,
        var(--cd-gold) calc(var(--rating) / 5 * 100%),
        rgba(255, 255, 255, 0.22) calc(var(--rating) / 5 * 100%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.cd-rating__value {
    font-weight: 800;
    color: var(--cd-gold);
    letter-spacing: 0.02em;
}

.cd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.cd-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 0.86rem;
    color: var(--cd-ink);
    white-space: nowrap;
}
.cd-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 18px;
}

/* Framed, softly tilted hero photo */
.cd-hero__photo {
    margin: 0;
    position: relative;
    justify-self: end;
    width: min(100%, 460px);
    transform: rotate(2.25deg);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    animation: cdRise 0.7s 0.15s ease both;
}
.cd-hero__photo:hover { transform: rotate(0deg) scale(1.015); }
.cd-hero__photo::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 40px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    pointer-events: none;
}
.cd-hero__photo::after {
    content: "";
    position: absolute;
    inset: 8% -6% -10% -6%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(106, 141, 255, 0.4), rgba(255, 90, 180, 0.16), transparent);
    filter: blur(34px);
}
.cd-hero__photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 44px 90px rgba(0, 0, 0, 0.55);
}

/* ---------- Shared bits ---------- */
.cd-shell { padding-top: 8px; }
.cd-kicker {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #8ab7ff;
    font-weight: 700;
    font-size: 0.78rem;
}
.cd-section-head { margin: clamp(40px, 6vh, 64px) 0 22px; }
.cd-section-head h2, .cd-steps h2, .cd-ingredients h2 {
    margin: 0;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

/* ---------- Method + ingredients ---------- */
.cd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 26px;
    align-items: start;
    scroll-margin-top: 90px;
}
.cd-steps, .cd-ingredients {
    padding: 30px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(16, 28, 54, 0.95), rgba(19, 35, 68, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 50px rgba(4, 14, 32, 0.35);
}
.cd-steps__list {
    list-style: none;
    counter-reset: cd-step;
    margin: 24px 0 0;
    padding: 0;
}
.cd-steps__list li {
    counter-increment: cd-step;
    position: relative;
    padding: 0 0 26px 66px;
}
.cd-steps__list li:last-child { padding-bottom: 4px; }
.cd-steps__list li::before {
    content: counter(cd-step);
    position: absolute;
    left: 0;
    top: -2px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 26px rgba(106, 141, 255, 0.35);
}
.cd-steps__list li::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 50px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(106, 141, 255, 0.5), rgba(106, 141, 255, 0.06));
}
.cd-steps__list li:last-child::after { display: none; }
.cd-steps__list li p {
    margin: 9px 0 0;
    color: var(--cd-ink);
    line-height: 1.65;
}

/* Ingredients rail sticks alongside the method */
.cd-ingredients {
    position: sticky;
    top: 92px;
}
.cd-ing-list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.cd-ing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.cd-ing:hover {
    background: rgba(106, 141, 255, 0.14);
    border-color: rgba(106, 141, 255, 0.4);
    transform: translateX(5px);
}
.cd-ing__name {
    font-weight: 700;
    color: #9ec1ff;
    border-bottom: 1px dashed rgba(158, 193, 255, 0.45);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.cd-ing:hover .cd-ing__name { color: #fff; border-bottom-color: #fff; }
.cd-ing__amount {
    font-family: Consolas, "SF Mono", Menlo, monospace;
    font-size: 0.82rem;
    color: var(--cd-gold);
    background: rgba(255, 215, 106, 0.1);
    border: 1px solid rgba(255, 215, 106, 0.22);
    padding: 4px 11px;
    border-radius: 999px;
    white-space: normal;
    text-align: right;
    max-width: 60%;
    flex: none;
}

/* ---------- Gallery ---------- */
.cd-gallery { scroll-margin-top: 90px; }
.cd-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    grid-auto-rows: 215px;
    grid-auto-flow: dense;
    gap: 16px;
}
.cd-gallery__grid figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.cd-gallery__grid figure:first-child {
    grid-column: span 2;
    grid-row: span 2;
}
.cd-gallery__grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cd-gallery__grid figure:hover img { transform: scale(1.06); }
.cd-gallery__grid figcaption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 26px 16px 13px;
    font-size: 0.85rem;
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(4, 10, 20, 0.85));
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.cd-gallery__grid figure:hover figcaption { opacity: 1; transform: none; }

/* ---------- Prev / next pager ---------- */
.cd-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: clamp(40px, 6vh, 64px);
}
.cd-pager__card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 20px 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.cd-pager__card:hover {
    transform: translateY(-4px);
    border-color: rgba(106, 141, 255, 0.5);
    background: rgba(106, 141, 255, 0.12);
}
.cd-pager__card--next { text-align: right; align-items: flex-end; }
.cd-pager__card small {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
    color: var(--muted);
}
.cd-pager__card strong { font-size: 1.12rem; }

/* ---------- You might also like ---------- */
.cd-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.cd-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.cd-card:hover {
    transform: translateY(-6px);
    border-color: rgba(106, 141, 255, 0.35);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.4);
}
.cd-card__media {
    position: relative;
    display: block;
    overflow: hidden;
}
.cd-card__media img {
    height: 230px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.cd-card:hover .cd-card__media img { transform: scale(1.05); }
.cd-card__chip {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 1;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cd-gold);
    background: rgba(6, 13, 25, 0.72);
    border: 1px solid rgba(255, 215, 106, 0.3);
    backdrop-filter: blur(8px);
}
.cd-card__body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 17px 19px;
}
.cd-card__body strong { font-size: 1.05rem; }
.cd-card__cue {
    font-size: 0.85rem;
    color: #9ec1ff;
    white-space: nowrap;
    transition: transform 0.2s ease, color 0.2s ease;
}
.cd-card:hover .cd-card__cue { color: #fff; transform: translateX(3px); }

/* ---------- Empty state + footer ---------- */
.cd-empty {
    max-width: 620px;
    margin: 48px auto 0;
    padding: 48px 36px;
    text-align: center;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(16, 28, 54, 0.95), rgba(19, 35, 68, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 50px rgba(4, 14, 32, 0.35);
}
.cd-empty h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.cd-empty p { color: var(--muted); line-height: 1.7; margin: 0 0 22px; }

.cd-footer {
    padding: 34px 24px 44px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.cd-footer__brand {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .cd-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
    .cd-hero__photo { justify-self: center; transform: rotate(0); width: min(100%, 420px); }
    .cd-layout { grid-template-columns: minmax(0, 1fr); }
    .cd-ingredients { position: static; }
}
@media (max-width: 640px) {
    .cd-hero { padding: 20px 14px 6px; }
    .cd-gallery__grid { grid-auto-rows: 180px; }
    .cd-gallery__grid figure:first-child { grid-column: span 2; }
    .cd-pager { grid-template-columns: 1fr; }
    .cd-pager__card--next { text-align: left; align-items: flex-start; }
    .cd-steps, .cd-ingredients { padding: 22px; }
    .cd-steps__list li { padding-left: 58px; }
}

/* Serve notes, variations, and the "Bar talk" history aside */
.cd-extras {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 26px;
}
.cd-extra { position: static; }
.cd-prose {
    margin: 14px 0 0;
    color: var(--cd-ink);
    line-height: 1.75;
}
.cd-history {
    margin-top: 26px;
    padding: 26px 30px;
    border-radius: 26px;
    border: 1px solid rgba(246, 199, 126, 0.28);
    background: rgba(246, 199, 126, 0.05);
}
.cd-history__text {
    margin: 10px 0 0;
    font-style: italic;
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--cd-ink);
}
@media (max-width: 960px) {
    .cd-extras { grid-template-columns: minmax(0, 1fr); }
}

/* Personal story inside Bar talk */
.cd-history__story {
    border-top: 1px dashed rgba(246, 199, 126, 0.25);
    padding-top: 16px;
    margin-top: 16px;
    font-style: normal;
}

/* ---------- Share sheet ---------- */
.share-sheet {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: grid;
    place-items: center;
    background: rgba(5, 7, 13, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.share-sheet[hidden] { display: none; }
.share-sheet__panel {
    width: min(420px, calc(100% - 32px));
    padding: 26px 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(16, 28, 54, 0.98), rgba(19, 35, 68, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.share-sheet__title {
    margin: 0 0 18px;
    font-family: var(--font-display, Georgia, serif);
    font-style: italic;
    font-size: 1.3rem;
    color: #fff;
    text-align: center;
}
.share-sheet__grid { display: grid; gap: 10px; }
.share-sheet__grid button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--cd-ink);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.share-sheet__grid button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}
.share-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    flex: none;
}
.share-ico--link { background: rgba(255, 255, 255, 0.14); }
.share-ico--fb { background: #1877f2; font-family: Georgia, serif; }
.share-ico--ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.share-ico--tt { background: #000; box-shadow: 1px 1px 0 #25f4ee, -1px -1px 0 #fe2c55; }
.share-ico--wa { background: #25d366; }
.share-sheet__hint {
    min-height: 1.2em;
    margin: 14px 2px 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #9ba8c4;
    text-align: center;
}
.share-sheet__close {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 11px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #9ba8c4;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}
.share-sheet__close:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
@media (max-width: 640px) {
    .share-sheet { place-items: end center; }
    .share-sheet__panel {
        width: 100%;
        border-radius: 24px 24px 0 0;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}
