/* ===================================================
   SHOP PAGE — shop.css
   Extends styles.css (must be loaded after it)
   =================================================== */

.nav-active {
    color: #816e7c !important;
    font-weight: 600;
}

/* ===================================================
   SHOP HERO
   =================================================== */
.sh-hero {
    height: 280px;
    background-color: #806e7c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-hero-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
}

.sh-hero-content h2 {
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.sh-hero-content p {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.88;
}

/* ===================================================
   SHOP SECTION
   =================================================== */
.sh-section {
    background-color: #fbecfb;
    padding: 48px 40px 80px;
    min-height: 60vh;
}

/* Toolbar */
.sh-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto 32px;
    flex-wrap: wrap;
    gap: 12px;
}

.sh-count {
    font-size: 0.88rem;
    color: #999;
}

.sh-sort-select {
    padding: 10px 40px 10px 16px;
    border: 2px solid #816e7c;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%23816e7c' d='M5 7L0 0h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
    -webkit-appearance: none;
    appearance: none;
    font-size: 0.92rem;
    font-family: Arial, sans-serif;
    color: #816e7c;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    min-width: 210px;
    transition: border-color 0.2s;
}

.sh-sort-select:focus { border-color: #5a4a57; }

/* Product grid */
.sh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
}

/* Product card */
.sh-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(129,110,124,0.12);
    transition: transform 0.22s, box-shadow 0.22s;
    display: flex;
    flex-direction: column;
}

.sh-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(129,110,124,0.22);
}

/* Card image */
.sh-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
}

.sh-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sh-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ede0ed, #fbecfb);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-card-img-placeholder span {
    font-size: 0.9rem;
    letter-spacing: 5px;
    font-weight: 700;
    color: #c4a8c0;
}

/* Category badge (top-left) */
.sh-badge-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #816e7c;
    color: #fbecfb;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    padding: 4px 11px;
    border-radius: 14px;
    text-transform: uppercase;
}

/* Neu badge (top-right) */
.sh-badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #c0709a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Card body */
.sh-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sh-card-name {
    font-size: 0.97rem;
    color: #2c2c2c;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.35;
    text-align: center;
}

.sh-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sh-price-old {
    font-size: 0.9rem;
    color: #bbb;
    text-decoration: line-through;
}

.sh-price {
    font-size: 1.12rem;
    font-weight: 700;
    color: #816e7c;
}

/* Cart button */
.sh-cart-btn {
    margin-top: auto;
    width: 100%;
    padding: 11px;
    background: #5c4f57;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.9rem;
    font-family: Arial, sans-serif;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, transform 0.1s;
}

.sh-cart-btn:hover  { background: #816e7c; }
.sh-cart-btn:active { transform: scale(0.98); }

/* Out-of-stock card */
.sh-card-oos {
    opacity: 0.6;
}
.sh-card-oos:hover {
    transform: none;
    box-shadow: 0 2px 14px rgba(129,110,124,0.12);
}
.sh-oos-badge {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    background: #f4eef4;
    color: #b09ab0;
    border: 1.5px solid #e0d0e0;
    border-radius: 7px;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ===================================================
   CART BUTTON IN NAV
   =================================================== */
.nav-cart {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: #333;
    font-weight: 400;
    transition: color 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.nav-cart:hover {
    color: #816e7c;
    background: none;
}

.nav-cart.has-items {
    gap: 13px;
}

.nav-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.nav-cart-count {
    position: absolute;
    top: -7px;
    right: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #816e7c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 3px;
    pointer-events: none;
}

/* ===================================================
   TOAST NOTIFICATION
   =================================================== */
.sh-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(90px);
    background: #816e7c;
    color: #fff;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 6px 24px rgba(129,110,124,0.4);
    z-index: 9999;
    transition: transform 0.32s cubic-bezier(.34,1.56,.64,1), opacity 0.32s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.sh-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===================================================
   CART PANEL (slide-in from right)
   =================================================== */
.sh-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.42);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.sh-cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.sh-cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 370px;
    max-width: 95vw;
    background: #fff;
    box-shadow: -4px 0 32px rgba(0,0,0,0.18);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.44s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sh-cart-overlay.open .sh-cart-panel { transform: translateX(0); }

/* Smooth slide-out on close (overrides spring) */
.sh-cart-overlay.sh-cart-closing .sh-cart-panel {
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Item stagger animation */
@keyframes sh-cart-item-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.sh-cart-item-animate {
    opacity: 0;
    animation: sh-cart-item-in 0.3s ease forwards;
}

.sh-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: #816e7c;
    color: #fbecfb;
    flex-shrink: 0;
}

.sh-cart-header h3 { font-size: 1.1rem; font-weight: 600; }

.sh-cart-article-count {
    font-size: 0.78rem;
    opacity: 0.75;
    display: block;
    margin-top: 3px;
}

.sh-cart-close {
    background: none;
    border: none;
    color: #fbecfb;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    transition: opacity 0.2s;
}

.sh-cart-close:hover { opacity: 0.7; }

.sh-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sh-cart-empty {
    text-align: center;
    color: #bbb;
    font-size: 0.95rem;
    margin-top: 60px;
    line-height: 2;
}

.sh-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fdf6fd;
    border-radius: 10px;
    padding: 12px;
}

.sh-cart-item-img {
    width: 54px;
    height: 54px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid #ede0ed;
}

.sh-cart-item-img-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 7px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ede0ed, #fbecfb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    letter-spacing: 2px;
    color: #c4a8c0;
    font-weight: 700;
    border: 1.5px solid #ede0ed;
}

.sh-cart-item-info {
    flex: 1;
    min-width: 0;
}

.sh-cart-item-name {
    font-size: 0.87rem;
    font-weight: 600;
    color: #2c2c2c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-cart-item-price {
    font-size: 0.88rem;
    color: #816e7c;
    font-weight: 700;
    margin-top: 3px;
}

.sh-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sh-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #d0b8cc;
    background: #fff;
    color: #816e7c;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
    font-family: Arial, sans-serif;
}

.sh-qty-btn:hover { background: #fbecfb; }

.sh-qty-num {
    min-width: 22px;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 600;
    color: #333;
}

.sh-cart-footer {
    padding: 18px 22px;
    border-top: 1px solid #f0e4ef;
    background: #fdf6fd;
    flex-shrink: 0;
}

.sh-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 14px;
}

.sh-cart-checkout-btn {
    width: 100%;
    padding: 14px;
    background: #816e7c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.sh-cart-checkout-btn:hover { background: #6d5a69; }

/* ===================================================
   SCHNELLANSICHT HOVER OVERLAY
   =================================================== */
.sh-quickview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
    cursor: pointer;
    z-index: 2;
}

.sh-card-img-wrap:hover .sh-quickview-overlay {
    background: rgba(0, 0, 0, 0.42);
}

.sh-quickview-label {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 9px 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    opacity: 0;
    transform: translateY(7px);
    transition: opacity 0.22s, transform 0.22s;
    pointer-events: none;
    white-space: nowrap;
}

.sh-card-img-wrap:hover .sh-quickview-label {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   PRODUCT LIGHTBOX
   =================================================== */
.sh-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sh-lightbox-overlay.open {
    display: flex;
}

.sh-lightbox-box {
    background: #fff;
    border-radius: 16px;
    max-width: 840px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.sh-lightbox-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #816e7c;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.15s;
}

.sh-lightbox-close:hover { color: #333; }

.sh-lightbox-gallery-col {
    padding: 24px 12px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-right: 1px solid #f0e4ef;
}

.sh-lightbox-img-outer {
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.sh-lightbox-main-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #ede0ed, #fbecfb);
    flex-shrink: 0;
}

.sh-lightbox-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.18s;
}

.sh-lightbox-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    letter-spacing: 5px;
    font-weight: 700;
    color: #c4a8c0;
}

.sh-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.88);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #816e7c;
    transition: background 0.15s;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sh-lb-nav svg { display: block; }
.sh-lb-nav:hover { background: #fff; }
.sh-lb-prev { left: 8px; }
.sh-lb-next { right: 8px; }

.sh-lightbox-thumbs {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.sh-lb-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 7px;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.6;
}

.sh-lb-thumb:hover { opacity: 0.9; }
.sh-lb-thumb.active { border-color: #816e7c; opacity: 1; }

.sh-lb-thumb-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 7px;
    background: linear-gradient(135deg, #ede0ed, #fbecfb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.45rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #c4a8c0;
    border: 2.5px solid #816e7c;
    flex-shrink: 0;
}

.sh-lightbox-info-col {
    padding: 28px 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sh-lb-product-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c2c2c;
    line-height: 1.3;
    padding-right: 34px;
}

.sh-lb-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.sh-lb-price-old {
    font-size: 0.95rem;
    color: #bbb;
    text-decoration: line-through;
}

.sh-lb-price {
    font-size: 1.55rem;
    font-weight: 700;
    color: #816e7c;
}

.sh-lb-description {
    font-size: 0.92rem;
    color: #666;
    line-height: 1.6;
    flex: 1;
}

.sh-lb-cart-btn {
    padding: 14px 24px;
    background: #5c4f57;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    margin-top: auto;
}

.sh-lb-cart-btn:hover { background: #816e7c; }

@media (max-width: 620px) {
    .sh-lightbox-box {
        grid-template-columns: 1fr;
    }
    .sh-lightbox-gallery-col {
        padding: 16px 16px 8px;
        border-right: none;
        border-bottom: 1px solid #f0e4ef;
    }
    .sh-lightbox-info-col { padding: 12px 16px 20px; }
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 768px) {

    /* ---- Hero ---- */
    .sh-hero {
        height: 200px;
    }

    .sh-hero-content h2 {
        font-size: 1.75rem;
    }

    .sh-hero-content p {
        font-size: 0.88rem;
        padding: 0 12px;
    }

    /* ---- Section & Toolbar ---- */
    .sh-section {
        padding: 22px 12px 44px;
    }

    .sh-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 20px;
    }

    .sh-count {
        font-size: 0.82rem;
    }

    .sh-sort-select {
        min-width: unset;
        width: 100%;
        font-size: 0.86rem;
        padding: 9px 36px 9px 12px;
    }

    /* ---- Product Grid & Cards ---- */
    .sh-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .sh-card-body {
        padding: 12px 12px 14px;
    }

    .sh-card-name {
        font-size: 0.85rem;
        margin-bottom: 7px;
    }

    .sh-price {
        font-size: 1rem;
    }

    .sh-price-old {
        font-size: 0.8rem;
    }

    .sh-card-price-row {
        margin-bottom: 12px;
        gap: 5px;
    }

    .sh-cart-btn {
        padding: 9px;
        font-size: 0.82rem;
    }

    .sh-oos-badge {
        font-size: 0.7rem;
        padding: 8px;
    }

    /* Quickview label — hidden on touch (hover doesn't work) */
    .sh-quickview-label {
        display: none;
    }

    /* ---- Toast ---- */
    .sh-toast {
        bottom: 16px;
        font-size: 0.88rem;
        padding: 12px 22px;
        border-radius: 24px;
        white-space: normal;
        text-align: center;
        max-width: 80vw;
    }

    /* ---- Cart Panel ---- */
    .sh-cart-panel {
        width: 100%;
    }

    .sh-cart-header {
        padding: 14px 16px;
    }

    .sh-cart-header h3 {
        font-size: 1rem;
    }

    .sh-cart-article-count {
        font-size: 0.72rem;
    }

    .sh-cart-items {
        padding: 12px;
        gap: 10px;
    }

    .sh-cart-item {
        padding: 10px;
        gap: 10px;
    }

    .sh-cart-item-img,
    .sh-cart-item-img-placeholder {
        width: 44px;
        height: 44px;
    }

    .sh-cart-item-name {
        font-size: 0.82rem;
    }

    .sh-cart-item-price {
        font-size: 0.82rem;
    }

    .sh-qty-btn {
        width: 26px;
        height: 26px;
        font-size: 0.95rem;
    }

    .sh-qty-num {
        font-size: 0.86rem;
    }

    .sh-cart-footer {
        padding: 14px 16px;
    }

    .sh-cart-total {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .sh-cart-checkout-btn {
        padding: 13px;
        font-size: 0.95rem;
    }

    /* ---- Product Lightbox ---- */
    .sh-lightbox-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .sh-lightbox-box {
        grid-template-columns: 1fr;
        border-radius: 14px 14px 0 0;
        max-height: 92vh;
    }

    .sh-lightbox-gallery-col {
        padding: 16px 16px 8px;
        border-right: none;
        border-bottom: 1px solid #f0e4ef;
    }

    .sh-lightbox-info-col {
        padding: 14px 16px 22px;
        gap: 10px;
    }

    .sh-lb-product-name {
        font-size: 1.1rem;
        padding-right: 28px;
    }

    .sh-lb-price {
        font-size: 1.3rem;
    }

    .sh-lb-description {
        font-size: 0.86rem;
    }

    .sh-lb-cart-btn {
        padding: 13px 20px;
        font-size: 0.95rem;
    }

    .sh-lb-thumb {
        width: 44px;
        height: 44px;
    }

    .sh-lb-thumb-placeholder {
        width: 44px;
        height: 44px;
    }

    .sh-lightbox-close {
        font-size: 1.5rem;
        top: 10px;
        right: 12px;
    }

    /* ---- Nav cart ---- */
    .nav-cart {
        font-size: 0.48rem;
        gap: 3px;
        padding: 3px 11px 3px 2px;
        background: none;
        color: #333;
        border-radius: 0;
    }

    .nav-cart-icon {
        font-size: 0.85rem;
    }

    .nav-cart-label {
        display: inline;
        font-size: 0.48rem;
        white-space: nowrap;
    }

    .nav-cart-label {
        display: inline;
        font-size: 0.48rem;
        white-space: nowrap;
    }
}