/* =============================================
   Wizualne Opowieści — Widgets CSS
   Floating: pakiety podglądów, kontakt, moje podglądy
   ============================================= */

/* =============================================
   FLOATING SIDEBAR — pakiety podglądów
   ============================================= */
#wo-floating-pkg {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(100%);
    z-index: 9999;
    background: rgba(10, 7, 14, 0.97);
    border: 1px solid rgba(231, 216, 176, 0.25);
    border-right: none;
    border-radius: 10px 0 0 10px;
    padding: 12px 10px;
    width: 168px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(0,0,0,0.7);
    font-family: "Montserrat", sans-serif;
}
#wo-floating-pkg.wo-fpkg-visible { transform: translateY(-50%) translateX(0); }
#wo-floating-pkg.wo-fpkg-hidden  { transform: translateY(-50%) translateX(100%); }
.wo-fpkg-close {
    position: absolute; top: 7px; right: 8px;
    background: none; border: none;
    color: rgba(231,216,176,0.4); font-size: 11px;
    cursor: pointer; padding: 3px; line-height: 1;
    transition: color 0.2s;
}
.wo-fpkg-close:hover { color: #e7d8b0; }
.wo-fpkg-header { margin-bottom: 10px; padding-bottom: 7px; border-bottom: 1px solid rgba(231,216,176,0.12); }
.wo-fpkg-title { display: block; font-family: "Cinzel", serif; font-size: 11px; color: #e7d8b0; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; white-space: nowrap; }
.wo-fpkg-sub { display: block; font-size: 9px; color: rgba(252,250,245,0.4); }
.wo-fpkg-item { padding: 7px 0; border-bottom: 1px solid rgba(231,216,176,0.08); }
.wo-fpkg-item:last-child { border-bottom: none; padding-bottom: 0; }
.wo-fpkg-info { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; gap: 4px; }
.wo-fpkg-name { font-size: 10px; font-weight: 600; color: rgba(252,250,245,0.85); text-transform: uppercase; letter-spacing: 0.5px; flex: 1; }
.wo-fpkg-price { font-size: 11px; font-weight: 700; color: #e7d8b0; white-space: nowrap; }
.wo-fpkg-btns { display: flex; gap: 5px; }
.wo-fpkg-btn { display: inline-flex; align-items: center; justify-content: center; font-family: "Montserrat", sans-serif; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 3px; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.wo-fpkg-btn-buy { flex: 1; padding: 5px 4px; background: rgba(231,216,176,0.1); border: 1px solid rgba(231,216,176,0.3); color: #e7d8b0; }
.wo-fpkg-btn-buy:hover { background: #e7d8b0; color: #0a070e; -webkit-text-fill-color: #0a070e; }
.wo-fpkg-btn-cart { width: 26px; height: 26px; padding: 0; background: rgba(231,216,176,0.05); border: 1px solid rgba(231,216,176,0.2); color: rgba(231,216,176,0.6); }
.wo-fpkg-btn-cart:hover { background: rgba(231,216,176,0.12); color: #e7d8b0; }
.wo-fpkg-btn-cart svg { pointer-events: none; }

/* =============================================
   FLOATING CONTACT WIDGET
   ============================================= */
.wo-cw-wrapper {
    position: fixed;
    left: -270px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    align-items: stretch;
    transition: left 0.35s cubic-bezier(0.4,0,0.2,1);
}
.wo-cw-wrapper.wo-cw-open { left: 0; }
.wo-cw-panel {
    position: relative;
    width: 270px;
    background: rgba(10,7,14,0.97);
    border: 1px solid rgba(231,216,176,0.25);
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 16px 14px;
    font-family: "Montserrat", sans-serif;
    box-shadow: 4px 0 30px rgba(0,0,0,0.7);
}
.wo-cw-tab {
    align-self: center;
    background: rgba(10,7,14,0.97);
    border: 1px solid rgba(231,216,176,0.25);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 14px 8px;
    cursor: pointer;
    font-family: "Cinzel", serif;
    font-size: 10px;
    font-weight: 700;
    color: #e7d8b0;
    letter-spacing: 2px;
    line-height: 1.8;
    text-align: center;
    box-shadow: 2px 0 15px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.wo-cw-wrapper.wo-cw-open .wo-cw-tab {
    box-shadow: 4px 0 15px rgba(0,0,0,0.3);
}
@keyframes wo-cw-pulse {
    0%   { box-shadow: 2px 0 15px rgba(0,0,0,0.5), 0 0 0 0 rgba(231,216,176,0.5); }
    70%  { box-shadow: 2px 0 15px rgba(0,0,0,0.5), 0 0 0 10px rgba(231,216,176,0); }
    100% { box-shadow: 2px 0 15px rgba(0,0,0,0.5), 0 0 0 0 rgba(231,216,176,0); }
}
.wo-cw-tab.wo-cw-pulsing {
    animation: wo-cw-pulse 1.2s ease-out 3;
}
.wo-cw-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: rgba(231,216,176,0.4); font-size: 11px; cursor: pointer; }
.wo-cw-close:hover { color: #e7d8b0; }
.wo-cw-title { font-family: "Cinzel", serif; font-size: 13px; color: #e7d8b0; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 10px; }
.wo-cw-info { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(231,216,176,0.1); display: flex; flex-direction: column; gap: 6px; }
.wo-cw-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(231,216,176,0.6); }
.wo-cw-link { font-size: 12px; color: rgba(252,250,245,0.7); text-decoration: none; }
.wo-cw-link:hover { color: #e7d8b0; }
.wo-cw-hours { font-size: 12px; color: rgba(252,250,245,0.7); }
#wo-cw-form { display: flex; flex-direction: column; gap: 7px; }
#wo-cw-panel #wo-cw-form input,
#wo-cw-panel #wo-cw-form textarea { background: rgba(0,0,0,0.4) !important; border: 1px solid rgba(231,216,176,0.2) !important; border-radius: 4px !important; padding: 7px 9px !important; margin: 0 !important; font-family: "Montserrat", sans-serif !important; font-size: 12px !important; color: #fcfaf5 !important; outline: none !important; resize: none !important; box-shadow: none !important; width: 100% !important; box-sizing: border-box !important; }
#wo-cw-form input::placeholder, #wo-cw-form textarea::placeholder { color: rgba(252,250,245,0.3); }
#wo-cw-form input:focus, #wo-cw-form textarea:focus { border-color: rgba(231,216,176,0.5) !important; }
.wo-cw-submit { background: rgba(10,10,10,0.85); color: #e7d8b0; border: 1px solid #e7d8b0; border-radius: 3px; padding: 8px; font-family: "Montserrat", sans-serif; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; width: 100%; }
.wo-cw-submit:hover { background: #e7d8b0; color: #000; -webkit-text-fill-color: #000; }

/* =============================================
   FLOATING BUTTON — Moje podglądy
   ============================================= */
.wo-ph-btn {
    position: fixed;
    bottom: 80px;
    right: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10,7,14,0.92);
    border: 1px solid rgba(231,216,176,0.3);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 10px 14px 10px 12px;
    cursor: pointer;
    font-family: "Cinzel", serif;
    font-size: 10px;
    font-weight: 700;
    color: #e7d8b0;
    letter-spacing: 0.5px;
    box-shadow: -2px 0 15px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, opacity 0.3s ease;
    user-select: none;
}
.wo-ph-btn:hover { transform: translateX(-3px); }
.wo-ph-btn svg { flex-shrink: 0; }
.wo-ph-count {
    background: #e7d8b0;
    color: #0a070e;
    font-size: 9px;
    font-weight: 700;
    font-family: "Montserrat", sans-serif;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wo-ph-count.wo-ph-count-visible { display: flex; }
.wo-ph-modal { position: fixed; inset: 0; z-index: 99990; pointer-events: none; }
.wo-ph-modal.wo-ph-hidden { display: none; }
.wo-ph-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); pointer-events: all; }
.wo-ph-drawer {
    position: fixed;
    width: 340px;
    max-width: calc(100vw - 24px);
    max-height: 70vh;
    /* top i right ustawiane przez JS na podstawie pozycji przycisku */
    background: rgba(10,7,14,0.97);
    border: 1px solid rgba(231,216,176,0.25);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    pointer-events: all;
    transform-origin: bottom right;
    animation: wo-ph-dropdown 0.2s cubic-bezier(0.4,0,0.2,1);
}
@keyframes wo-ph-slidein {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes wo-ph-dropdown {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.wo-ph-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; border-bottom: 1px solid rgba(231,216,176,0.1); flex-shrink: 0; }
.wo-ph-drawer-title { font-family: "Cinzel", serif; font-size: 12px; color: #e7d8b0; letter-spacing: 1px; text-transform: uppercase; }
.wo-ph-close { background: none; border: none; color: rgba(231,216,176,0.4); font-size: 12px; cursor: pointer; padding: 4px; line-height: 1; }
.wo-ph-close:hover { color: #e7d8b0; }
.wo-ph-drawer-desc { font-size: 10px; color: rgba(231,216,176,0.4); font-family: "Montserrat", sans-serif; padding: 8px 16px 4px; margin: 0; flex-shrink: 0; }
.wo-ph-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px; overflow-y: auto; flex: 1; }
.wo-ph-loading { font-size: 11px; color: rgba(231,216,176,0.4); font-family: "Montserrat", sans-serif; width: 100%; text-align: center; padding: 20px 0; }
.wo-ph-item { width: calc(33.333% - 8px); cursor: pointer; transition: transform 0.2s ease; }
.wo-ph-item:hover { transform: translateY(-2px); }
.wo-ph-thumb-wrap { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid rgba(231,216,176,0.15); aspect-ratio: 2/3; }
.wo-ph-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.wo-ph-item-overlay { position: absolute; inset: 0; background: rgba(10,7,14,0.75); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.wo-ph-item:hover .wo-ph-item-overlay { opacity: 1; }
.wo-ph-item-overlay span { font-family: "Cinzel", serif; font-size: 9px; color: #e7d8b0; letter-spacing: 1px; text-align: center; }
.wo-ph-item-meta { margin-top: 5px; }
.wo-ph-item-style { display: block; font-size: 9px; color: rgba(231,216,176,0.7); font-family: "Montserrat", sans-serif; font-weight: 600; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-ph-item-date { display: block; font-size: 8px; color: rgba(231,216,176,0.35); font-family: "Montserrat", sans-serif; }
.wo-ph-footer { padding: 12px 16px; border-top: 1px solid rgba(231,216,176,0.1); flex-shrink: 0; }
.wo-ph-go-btn { display: block; text-align: center; font-family: "Cinzel", serif; font-size: 10px; color: #e7d8b0; letter-spacing: 0.5px; text-decoration: none; padding: 8px; border: 1px solid rgba(231,216,176,0.2); border-radius: 6px; transition: background 0.2s; }
.wo-ph-go-btn:hover { background: rgba(231,216,176,0.08); color: #e7d8b0; }
.wo-ph-empty { font-size: 11px; color: rgba(231,216,176,0.35); font-family: "Montserrat", sans-serif; width: 100%; text-align: center; padding: 24px 0; }

/* Nadpisanie @keyframes wo-ph-slidein dla mobile — musi być poza @media */
@media (max-width: 480px) {
    .wo-ph-drawer {
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 75vh !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.7) !important;
        transform-origin: bottom center !important;
        animation: wo-ph-slidein-mobile 0.25s cubic-bezier(0.4,0,0.2,1) !important;
    }
    .wo-ph-btn { bottom: 140px; }
    .wo-ph-item { width: calc(33.333% - 7px); }
}
@keyframes wo-ph-slidein-mobile {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* =============================================
   MOBILE — napraw horizontal scroll z fixed widgets
   ============================================= */
@media (max-width: 768px) {
    .wo-cw-wrapper {
        display: none !important;
    }
    #wo-floating-pkg { display: none !important; }
}