/* ==========================================================================
   PAUSE A PARIS - SHOP (cakes & custom orders)
   --------------------------------------------------------------------------
   Prerequisite: tokens.css is loaded BEFORE this file
   (brand tokens, reset, typography, loader, toast).
   This file only contains components specific to the Shop.
   ========================================================================== */

/* ===== SHOP HEADER ===== */
.magasin-header {
    position: relative;
    background: linear-gradient(140deg, var(--charcoal-2) 0%, var(--charcoal) 60%, var(--charcoal-3) 100%);
    padding: 3.5rem 1rem 2.5rem;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.magasin-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.back-to-menu-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    color: #fff;
    text-decoration: none;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
    z-index: 10;
}

.back-to-menu-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: translateX(-3px);
}

.back-to-menu-btn i {
    font-size: 0.85rem;
}

.dark-mode-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    z-index: 10;
}

.dark-mode-toggle:hover {
    background: rgba(255,255,255,0.35);
    transform: rotate(30deg);
}

body.dark-mode .dark-mode-toggle i::before { content: "\f185"; }

.magasin-header-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.magasin-icon-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.magasin-header-content h1 {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 0.3rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.magasin-header-content p {
    font-size: 0.85rem;
    letter-spacing: 4px;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.header-divider {
    width: 60px; height: 3px;
    background: #fff;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    opacity: 0.7;
}

/* ===== SHOP NAV ===== */
.magasin-nav {
    position: sticky;
    top: 0;
    background: var(--background);
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: background-color var(--transition);
}

.magasin-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    padding: 0 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.magasin-nav-container::-webkit-scrollbar { display: none; }

.magasin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1.2rem;
    text-decoration: none;
    color: var(--secondary-text);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all var(--transition);
}

.magasin-nav-link i {
    font-size: 0.9rem;
    color: inherit;
}

.magasin-nav-link:hover {
    color: var(--primary-text);
}

.magasin-nav-link.active {
    color: var(--primary-text);
    border-bottom-color: var(--accent);
}

/* ===== MAIN ===== */
.magasin-main {
    padding-bottom: 3rem;
}

.magasin-section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.magasin-section:last-of-type {
    border-bottom: none;
}

.section-header {
    padding: 0 1rem 1.5rem 1rem;
    text-align: center;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 55px; height: 55px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--primary-text);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-divider {
    width: 60px; height: 3px;
    background: var(--accent);
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

/* ===== MAGASIN GRID ===== */
.magasin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
}

.magasin-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid transparent;
}

.magasin-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-strong);
}

.magasin-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--surface-2);
    overflow: hidden;
    position: relative;
}

body.dark-mode .magasin-media {
    background: var(--surface-3);
}

.magasin-media video,
.magasin-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.magasin-card h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.8rem 0.8rem 0.3rem;
    text-align: center;
    color: var(--primary-text);
    line-height: 1.3;
    flex-grow: 1;
}

.magasin-note {
    font-size: 0.75rem;
    color: var(--secondary-text);
    text-align: center;
    padding: 0 0.8rem 0.3rem;
    font-style: italic;
    line-height: 1.4;
}

.magasin-btn {
    margin: 0.6rem 0.7rem 0.8rem;
    padding: 0.6rem 0.7rem;
    background: #25D366; /* official WhatsApp green (order button) */
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(37,211,102,0.3);
}

.magasin-btn:hover {
    background: #1DA851;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37,211,102,0.5);
}

.magasin-btn:active {
    transform: scale(0.97);
}

.magasin-btn i {
    font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.magasin-footer {
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    /* Bottom room so the fixed "return to menu" button never covers the
       last footer lines (same 6.5rem the menu footer reserves). */
    padding: 3rem 1rem 6.5rem;
    padding: 3rem 1rem calc(6.5rem + env(safe-area-inset-bottom));
    text-align: center;
    transition: all var(--transition);
}

.footer-content {
    max-width: 500px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.footer-tagline {
    font-size: 0.75rem;
    color: var(--secondary-text);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--mint-grad);
    color: var(--ink-on-mint);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 14px 30px -16px rgba(191, 155, 43, 0.95);
}

.footer-back-btn:hover {
    filter: brightness(1.04);
    transform: translateY(-3px);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    color: var(--primary-text);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--mint-grad);
    border-color: transparent;
    color: var(--ink-on-mint);
    transform: translateY(-3px);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--secondary-text);
    opacity: 0.7;
}

/* Footer signature: same size as the copyright line above
   (signature green link via --accent in tokens.css). */
.magasin-footer .footer-credit {
    font-size: 0.75rem;
}

/* ===== FLOAT BUTTON: RETURN TO MENU ===== */
.return-menu-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    background: var(--mint-grad);
    color: var(--ink-on-mint);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    box-shadow: 0 10px 24px -10px rgba(191, 155, 43, 0.9);
    z-index: 50;
    text-decoration: none;
    transition: all var(--transition);
    animation: floatPulse 2s ease-in-out infinite;
}

.return-menu-float:hover {
    transform: scale(1.1);
    box-shadow: 0 14px 30px -10px rgba(191, 155, 43, 1);
}

@keyframes floatPulse {
    0%, 100% { box-shadow: 0 10px 24px -10px rgba(191, 155, 43, 0.9); }
    50% { box-shadow: 0 10px 30px -8px rgba(191, 155, 43, 1); }
}

.return-tooltip {
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    transform: translateY(-50%);
    background: var(--charcoal);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.return-menu-float:hover .return-tooltip {
    opacity: 1;
}

.return-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--charcoal);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 25px; left: 25px;
    width: 44px; height: 44px;
    background: var(--surface);
    color: var(--primary-text);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-text);
    border-color: var(--primary-text);
    color: var(--surface);
    transform: translateY(-3px);
}

/* ===== FLOATING BUTTONS STEP ASIDE WHILE SCROLLING (below 1280px) =====
   While the visitor is really scrolling, magasin-script.js sets
   body.floats-hidden and removes it 300ms after the last scroll movement.
   While it is set, the floating buttons are transparent, out of the tab
   order (visibility) and not clickable, so they never cover a product or its
   order button in motion. Only opacity/visibility change (no size, colour or
   transform); with prefers-reduced-motion the switch is instant (tokens.css).
   A button with KEYBOARD focus stays visible; browsers without
   :focus-visible ignore the rule and the buttons simply stay put. The class
   name must NOT contain "scroll": tokens.css hides the scrollbar of every
   [class*="scroll"] element, so on <body> the page would lose its
   scrollbar, reflow and jump. */
@media (max-width: 1279px) {
    body.floats-hidden .return-menu-float:not(:focus-visible),
    body.floats-hidden .back-to-top:not(:focus-visible) {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
    .magasin-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .magasin-header-content h1 {
        font-size: 3.5rem;
    }
}

@media (min-width: 992px) {
    .magasin-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 0 2rem;
        gap: 1.5rem;
    }

    .magasin-main {
        max-width: 1200px;
        margin: 0 auto;
    }

    .magasin-card h3 {
        font-size: 1rem;
    }

    .magasin-header {
        padding: 4.5rem 1rem 3.5rem;
    }
}
/* ==========================================================================
   INTEGRATION WITH THE SHARED FOUNDATION (tokens.css)
   ========================================================================== */

/* Frosted-glass navigation bar, like the main menu */
.magasin-nav {
    background: var(--glass);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--shadow-xs);
}

/* Anchoring: header + sticky nav must not hide the headings */
html {
    scroll-padding-top: 130px;
}

.magasin-section {
    scroll-margin-top: 130px;
}

/* Small accented letter in the wordmark */
.small-a {
    font-size: 0.62em;
    vertical-align: 0.28em;
    letter-spacing: 0;
    opacity: 0.85;
}

/* Header banner: same golden gradient as the brand */
.magasin-header {
    background: linear-gradient(140deg, var(--charcoal-2) 0%, var(--charcoal) 60%, var(--charcoal-3) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.magasin-header-content h1 {
    font-family: var(--font-display);
    letter-spacing: 0.05em;
}

/* Back button: pill readable on a dark background */
.back-to-menu-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--on-dark);
    backdrop-filter: blur(10px);
}

.back-to-menu-btn:hover {
    background: var(--mint-grad);
    border-color: transparent;
    color: var(--ink-on-mint);
}


/* ==========================================================================
   LEGACY BROWSER COMPATIBILITY
   --------------------------------------------------------------------------
   Browsers without aspect-ratio support: product thumbnails keep their
   square frame through proportional padding, so the Shop grid stays
   regular.
   ========================================================================== */

@supports not (aspect-ratio: 1 / 1) {
    .magasin-media {
        height: 0;
        padding-bottom: 100%;
    }

    .magasin-media video,
    .magasin-media img {
        position: absolute;
        top: 0;
        left: 0;
    }
}
