/* ==============================================
   SCHLAGER RADIO SHOP - SHOPIFY INTEGRATION
============================================== */

:root {
    --shop-primary: hsl(356, 85%, 46%);
    --shop-primary-hover: hsl(356, 85%, 40%);
    --shop-accent: hsl(356, 85%, 56%);
    --shop-bg: #ffffff;
    --shop-card-bg: #ffffff;
    --shop-border: rgba(0, 0, 0, 0.1);
    --shop-text: #1a1a1a;
    --shop-text-muted: rgba(0, 0, 0, 0.6);
}

/* ==============================================
   SHOP OVERVIEW
============================================== */

.shop-section {
    padding: 140px 0 80px;
    min-height: 100vh;
    background: var(--shop-bg);
}

/* Page Subtitle for Shop */
.page-subtitle {
    font-size: 1.125rem;
    color: var(--shop-text-muted);
    line-height: 1.7;
    max-width: 800px;
    margin: 0;
}

/* Loading State */
.shop-loading,
.product-loading {
    text-align: center;
    padding: 80px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--shop-border);
    border-top-color: var(--shop-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.shop-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--shop-text-muted);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 32px;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Product Card */
.product-card {
    background: var(--shop-card-bg);
    border: 1px solid var(--shop-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: var(--shop-primary);
}

.product-card__image-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.08);
}

.product-card__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--shop-text-muted);
    font-size: 0.875rem;
}

.product-card__content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-card__title a {
    color: var(--shop-text);
    text-decoration: none;
    transition: color 0.2s;
}

.product-card__title a:hover {
    color: var(--shop-primary);
}

.product-card__description {
    font-size: 0.875rem;
    color: var(--shop-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
    flex: 1;
}

.product-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--shop-text);
    margin-bottom: 16px;
}

.product-card__button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--shop-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.product-card__button:hover {
    background: var(--shop-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 7, 23, 0.4);
}

/* ==============================================
   PRODUCT DETAIL PAGE
============================================== */

.product-detail-section {
    padding: 140px 0 80px;
    min-height: 100vh;
    background: var(--shop-bg);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--shop-text-muted);
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--shop-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--shop-text);
}

.breadcrumb-sep {
    color: var(--shop-border);
}

.breadcrumb-current {
    color: var(--shop-text);
}

/* Product Detail Grid */
.product-detail__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .product-detail__grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }
}

/* Product Images */
.product-detail__main-image {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 16px;
}

.product-detail__main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail__thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.product-detail__thumbnails img {
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    border: 2px solid transparent;
}

.product-detail__thumbnails img:hover,
.product-detail__thumbnails img.active {
    opacity: 1;
    border-color: var(--shop-primary);
}

/* Product Info */
.product-detail__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.product-detail__price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--shop-text);
}

.product-detail__availability {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.product-detail__availability.available {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.product-detail__availability.unavailable {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.product-detail__description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--shop-text-muted);
    margin-bottom: 32px;
}

.product-detail__description h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--shop-text);
    margin-top: 24px;
    margin-bottom: 12px;
}

.product-detail__description p {
    margin-bottom: 16px;
}

.product-detail__description ul {
    list-style: disc;
    padding-left: 24px;
    margin: 16px 0;
}

.product-detail__description ul li {
    margin-bottom: 8px;
}

.product-detail__description strong {
    color: var(--shop-text);
    font-weight: 700;
}

/* Variant Options */
.variant-option {
    margin-bottom: 24px;
}

.option-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--shop-text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-btn {
    padding: 10px 20px;
    border: 2px solid var(--shop-border);
    border-radius: 8px;
    background: transparent;
    color: var(--shop-text);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.option-btn:hover {
    border-color: var(--shop-primary);
    background: rgba(225, 7, 23, 0.1);
}

.option-btn.active {
    background: var(--shop-primary);
    border-color: var(--shop-primary);
    color: #fff;
}

/* Product Actions */
.product-detail__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 32px 0;
}

@media (min-width: 640px) {
    .product-detail__actions {
        flex-direction: row;
    }
}

.product-detail__actions .btn {
    flex: 1;
    height: 56px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-detail__shipping {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid var(--shop-border);
    font-size: 0.875rem;
    color: var(--shop-text-muted);
}

.product-detail__shipping span {
    font-size: 1.5rem;
}

/* ==============================================
   CART DRAWER
============================================== */

.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.cart-drawer-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: var(--shop-card-bg);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--shop-border);
}

.cart-drawer__header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--shop-text);
    margin: 0;
}

.cart-drawer__header button {
    background: transparent;
    border: none;
    color: var(--shop-text);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.cart-drawer__header button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cart-drawer__items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--shop-text-muted);
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f5f5f5;
    border: 1px solid var(--shop-border);
}

.cart-item__image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item__info {
    flex: 1;
    min-width: 0;
}

.cart-item__title {
    font-weight: 600;
    color: var(--shop-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item__variant {
    font-size: 0.875rem;
    color: var(--shop-text-muted);
    margin-bottom: 8px;
}

.cart-item__price {
    font-weight: 600;
    color: var(--shop-primary);
    margin-bottom: 12px;
}

.cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item__qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--shop-border);
    border-radius: 6px;
    background: transparent;
    color: var(--shop-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.cart-item__qty-btn:hover {
    border-color: var(--shop-primary);
    background: rgba(225, 7, 23, 0.1);
}

.cart-item__quantity span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.cart-item__remove {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.125rem;
    padding: 4px 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.cart-item__remove:hover {
    opacity: 1;
}

.cart-drawer__footer {
    padding: 24px;
    border-top: 1px solid var(--shop-border);
    background: #f9f9f9;
}

.cart-drawer__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cart-drawer__total span:first-child {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--shop-text);
}

.cart-drawer__total span:last-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--shop-primary);
}

.cart-drawer__shipping-note {
    font-size: 0.75rem;
    color: var(--shop-text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.cart-drawer__footer .btn {
    width: 100%;
    height: 56px;
    font-size: 1rem;
    font-weight: 600;
}

/* ==============================================
   TOAST NOTIFICATIONS
============================================== */

.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--shop-card-bg);
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    padding: 16px 24px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast--success {
    border-color: var(--shop-primary);
}

.toast strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--shop-text);
    margin-bottom: 4px;
}

.toast p {
    font-size: 0.875rem;
    color: var(--shop-text-muted);
    margin: 0;
}

/* ==============================================
   BUTTONS
============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--shop-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--shop-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 7, 23, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--shop-primary);
    color: var(--shop-primary);
}

.btn-outline:hover {
    background: var(--shop-primary);
    color: #fff;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==============================================
   RESPONSIVE
============================================== */

@media (max-width: 768px) {
    .shop-section,
    .product-detail-section {
        padding: 100px 0 60px;
    }

    .shop-title {
        font-size: 2rem;
    }

    .product-detail__title {
        font-size: 1.75rem;
    }

    .cart-drawer {
        max-width: 100%;
    }
}
