/* Dragons Jersey Shop Manager - Frontend Styles (Material/Tailwind-inspired) */
.dd-jersey-shop-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Hero */
.dd-jersey-hero {
    position: relative;
    text-align: center;
    margin: 0 -16px 32px;
    padding: 48px 16px 56px;
    background: linear-gradient(135deg, #0f172a 0%, #1f2937 50%, #111827 100%);
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.dd-jersey-hero-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(220,38,38,0.25) 0%, transparent 70%);
    pointer-events: none;
}
.dd-jersey-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.7);
    pointer-events: none;
}
.dd-jersey-hero-content {
    position: relative;
    z-index: 1;
}
.dd-jersey-hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #f9fafb;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.dd-jersey-hero-season {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e5e7eb;
    background: rgba(220,38,38,0.2);
    border: 1px solid rgba(220,38,38,0.35);
    padding: 4px 14px;
    border-radius: 9999px;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}
.dd-jersey-hero-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 8px;
}
.dd-jersey-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.dd-jersey-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #f3f4f6;
    line-height: 1;
}
.dd-jersey-stat-available {
    color: #34d399;
}
.dd-jersey-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Filters (Glassmorphism) */
.dd-jersey-filters {
    margin-bottom: 32px;
    position: sticky;
    top: 12px;
    z-index: 10;
    padding: 14px 16px;
    background: rgba(31,41,55,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(75,85,99,0.5);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.dd-jersey-filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dd-jersey-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dd-jersey-shop-wrapper .dd-jersey-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid rgba(220,38,38,0.6) !important;
    background: rgba(55,65,81,0.6);
    color: #dc2626 !important;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.2;
}
.dd-jersey-shop-wrapper .dd-jersey-pill:hover {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
    background: rgba(55,65,81,0.8);
    transform: translateY(-1px);
}
.dd-jersey-shop-wrapper .dd-jersey-pill.active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(220,38,38,0.35);
    transform: scale(1.02);
}
.dd-jersey-search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.dd-jersey-search input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid rgba(75,85,99,0.6);
    border-radius: 10px;
    font-size: 0.95rem;
    background: rgba(17,24,39,0.6);
    color: #e5e7eb;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dd-jersey-search input[type="text"]:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
}
.dd-jersey-shop-wrapper .dd-jersey-btn-search,
.dd-jersey-shop-wrapper .dd-jersey-btn-clear {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.dd-jersey-shop-wrapper .dd-jersey-btn-search {
    background: var(--dd-jersey-btn-bg, #dc2626) !important;
    color: var(--dd-jersey-btn-text, #fff) !important;
    box-shadow: 0 2px 6px rgba(220,38,38,0.25);
}
.dd-jersey-shop-wrapper .dd-jersey-btn-search:hover {
    background: var(--dd-jersey-btn-bg-hover, #b91c1c) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220,38,38,0.35);
}
.dd-jersey-shop-wrapper .dd-jersey-btn-clear {
    background: rgba(55,65,81,0.6);
    color: #dc2626 !important;
    border: 1px solid rgba(220,38,38,0.6) !important;
}
.dd-jersey-shop-wrapper .dd-jersey-btn-clear:hover {
    background: rgba(220,38,38,0.15);
    border-color: #dc2626 !important;
}

/* Grid */
.dd-jersey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* Scroll reveal */
.dd-jersey-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.dd-jersey-card-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card */
.dd-jersey-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dd-jersey-card:hover {
    box-shadow: 0 20px 50px rgba(220,38,38,0.12);
    transform: translateY(-6px);
    border-color: rgba(220,38,38,0.35);
}
.dd-jersey-card-visible:hover {
    transform: translateY(-6px);
}

/* Card Image (1:1 square desktop, 3:4 portrait mobile) */
.dd-jersey-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.dd-jersey-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.dd-jersey-card:hover .dd-jersey-card-image img {
    transform: scale(1.06);
}
.dd-jersey-card-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(17,24,39,0.6), transparent);
    pointer-events: none;
}
.dd-jersey-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1f2937;
}
.dd-jersey-card-placeholder-letter {
    font-size: 4rem;
    font-weight: 800;
    color: #9ca3af;
    line-height: 1;
}
.dd-jersey-card-placeholder-num {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
}

/* Sold Ribbon */
.dd-jersey-sold-ribbon {
    position: absolute;
    top: 16px;
    right: -28px;
    background: #7f1d1d;
    color: #fca5a5;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 32px;
    transform: rotate(15deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 3;
}

/* Card Body & Header */
.dd-jersey-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dd-jersey-card-header {
    border-bottom: 1px solid #374151;
    padding-bottom: 12px;
}
.dd-jersey-card-name {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: #f9fafb;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.dd-jersey-card-number {
    font-size: 0.75rem;
    color: #fff;
    font-weight: 700;
    background: #dc2626;
    padding: 3px 10px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.dd-jersey-card-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Product Rows */
.dd-jersey-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dd-jersey-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #111827;
    border: 1px solid #374151;
    transition: border-color 0.2s, background 0.2s;
}
.dd-jersey-row-available {
    border-left: 4px solid #10b981;
}
.dd-jersey-row-available:hover {
    border-color: #10b981;
    background: #0f1f1a;
}
.dd-jersey-row-sold {
    border-left: 4px solid #7f1d1d;
    opacity: 0.6;
}
.dd-jersey-row-sold:hover {
    border-color: #7f1d1d;
    background: #1f1515;
}
.dd-jersey-row-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.dd-jersey-row-type {
    font-weight: 700;
    font-size: 0.9rem;
    color: #f3f4f6;
    line-height: 1.2;
}
.dd-jersey-row-price {
    font-size: 1rem;
    color: #34d399;
    font-weight: 800;
}
.dd-jersey-row-owner {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
}
.dd-jersey-row-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Badges */
.dd-jersey-badge-available {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 9999px;
    background: rgba(16,185,129,0.15);
    color: #34d399;
    font-size: 0.7rem;
    font-weight: 600;
    width: max-content;
    border: 1px solid rgba(16,185,129,0.25);
}
.dd-jersey-badge-sold {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 9999px;
    background: rgba(127,29,29,0.25);
    color: #fca5a5;
    font-size: 0.7rem;
    font-weight: 700;
    width: max-content;
    border: 1px solid rgba(127,29,29,0.4);
}

/* Sponsor Button */
.dd-jersey-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--dd-jersey-btn-bg, #dc2626);
    color: var(--dd-jersey-btn-text, #fff);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(220,38,38,0.3);
}
.dd-jersey-btn:hover {
    background: var(--dd-jersey-btn-bg-hover, #b91c1c);
    color: var(--dd-jersey-btn-text, #fff);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(220,38,38,0.4);
}
.dd-jersey-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(220,38,38,0.3);
}
.dd-jersey-btn-arrow {
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}
.dd-jersey-btn:hover .dd-jersey-btn-arrow {
    transform: translateX(3px);
}

/* No results */
.dd-jersey-no-results {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 768px) {
    .dd-jersey-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    .dd-jersey-hero h2 {
        font-size: 1.8rem;
    }
    .dd-jersey-hero-stats {
        gap: 20px;
    }
    .dd-jersey-stat-num {
        font-size: 1.3rem;
    }
    .dd-jersey-filters {
        position: relative;
        top: auto;
    }
    .dd-jersey-product-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .dd-jersey-row-main {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .dd-jersey-row-action {
        margin-left: auto;
    }
}
@media (max-width: 640px) {
    .dd-jersey-grid {
        grid-template-columns: 1fr;
    }
    .dd-jersey-card-image {
        aspect-ratio: 1 / 1;
    }
    .dd-jersey-pills {
        gap: 6px;
    }
    .dd-jersey-pill {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .dd-jersey-hero h2 {
        font-size: 1.6rem;
    }
}

/* Product page fields */
.dd-jersey-product-fields {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #374151;
    border-radius: 8px;
    background: #1f2937;
}
.dd-jersey-field {
    margin-bottom: 14px;
}
.dd-jersey-field:last-child {
    margin-bottom: 0;
}
.dd-jersey-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #f3f4f6;
}
.dd-jersey-field label .required {
    color: #dc2626;
}
.dd-jersey-field input[type="text"],
.dd-jersey-field select {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #4b5563;
    background: #374151;
    color: #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
}
.dd-jersey-field small {
    display: block;
    margin-top: 4px;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Cart reservation countdown */
.dd-jersey-checkout-timer {
    position: sticky;
    top: 0;
    z-index: 100;
    display: block;
    padding: 20px 24px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 2px solid #dc2626;
    border-radius: 16px;
    color: #f3f4f6;
    text-align: center;
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.25);
}
.dd-jersey-timer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
}
.dd-jersey-timer-icon {
    font-size: 2rem;
    line-height: 1;
}
.dd-jersey-timer-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f9fafb;
    line-height: 1.3;
}
.dd-jersey-timer-display {
    font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: #34d399;
    background: #000;
    padding: 6px 12px;
    border-radius: 10px;
    letter-spacing: 0.06em;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.25);
}
.dd-jersey-timer-subtext {
    font-size: 0.95rem;
    color: #d1d5db;
    font-weight: 500;
}
.dd-jersey-timer-warning .dd-jersey-timer-display {
    color: #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
    animation: dd-jersey-timer-pulse 1s infinite;
}
.dd-jersey-timer-expired .dd-jersey-timer-display {
    color: #f87171;
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.35);
}
@keyframes dd-jersey-timer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Reserved badge */
.dd-jersey-badge-reserved {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 9999px;
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    font-size: 0.7rem;
    font-weight: 700;
    width: max-content;
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.dd-jersey-row-reserved {
    border-left: 4px solid #fbbf24;
    opacity: 0.85;
}
.dd-jersey-row-reserved:hover {
    border-color: #fbbf24;
    background: #2a2214;
}

/* Hide Klarna payment option for jersey products */
.dd-jersey-hide-klarna {
    display: none !important;
}

/* Promotional banner CTA */
.dd-jersey-banner-wrap {
    width: 100%;
    margin: 24px auto;
    text-align: center;
}

.dd-jersey-banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 28px;
    box-sizing: border-box;
    text-decoration: none;
    color: #ffffff;
    background:
        linear-gradient(120deg, rgba(200, 16, 46, 0.98) 0%, rgba(200, 16, 46, 0.46) 34%, rgba(0, 0, 0, 0.08) 58%),
        linear-gradient(135deg, #050505 0%, #111111 52%, #202020 100%);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.34),
        0 0 0 4px rgba(200, 16, 46, 0.12);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
    isolation: isolate;
}

.dd-jersey-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: translateX(-100%);
    animation: dd-banner-shine 3.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.dd-jersey-banner::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -90px;
    width: 260px;
    height: 260px;
    background: rgba(200, 16, 46, 0.42);
    border-radius: 50%;
    filter: blur(12px);
    pointer-events: none;
    z-index: 0;
}

.dd-jersey-banner:hover,
.dd-jersey-banner:focus-visible {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.45),
        0 0 0 5px rgba(200, 16, 46, 0.2),
        0 0 34px rgba(200, 16, 46, 0.42);
    outline: none;
}

.dd-jersey-banner-badge {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background:
        linear-gradient(135deg, #ffffff 0%, #eeeeee 100%);
    color: #c8102e;
    box-shadow:
        inset 0 -6px 0 rgba(0, 0, 0, 0.1),
        0 12px 24px rgba(0, 0, 0, 0.28);
    transform: rotate(-4deg);
}

.dd-jersey-banner-badge svg {
    width: 46px;
    height: 46px;
    fill: currentColor;
}

.dd-jersey-banner-content {
    position: relative;
    z-index: 2;
    text-align: left;
    min-width: 0;
}

.dd-jersey-banner-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    padding: 6px 11px;
    background: #ffffff;
    color: #111111;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.dd-jersey-banner-kicker::before {
    content: "";
    width: 9px;
    height: 9px;
    background: #c8102e;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(200, 16, 46, 0.18);
    animation: dd-banner-pulse 1.6s ease-in-out infinite;
}

.dd-jersey-banner-title {
    display: block;
    font-size: clamp(24px, 3.4vw, 42px);
    font-weight: 950;
    line-height: 0.98;
    text-transform: uppercase;
    letter-spacing: -0.045em;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.38);
}

.dd-jersey-banner-subtitle {
    display: block;
    margin-top: 9px;
    color: #eeeeee;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.dd-jersey-banner-button {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding: 15px 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f2f2f2 100%);
    color: #111111;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.32),
        inset 0 -3px 0 rgba(0, 0, 0, 0.12);
    transition:
        transform 0.22s ease,
        background 0.22s ease;
}

.dd-jersey-banner:hover .dd-jersey-banner-button,
.dd-jersey-banner:focus-visible .dd-jersey-banner-button {
    transform: scale(1.06);
    background: #ffffff;
}

.dd-jersey-banner-button::after {
    content: " \2192";
    font-weight: 950;
}

@keyframes dd-banner-shine {
    0% {
        transform: translateX(-120%);
    }
    42% {
        transform: translateX(120%);
    }
    100% {
        transform: translateX(120%);
    }
}

@keyframes dd-banner-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.75;
    }
}

@media (max-width: 760px) {
    .dd-jersey-banner {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px 20px;
        text-align: center;
        border-radius: 22px;
    }

    .dd-jersey-banner-badge {
        margin: 0 auto;
        width: 72px;
        height: 72px;
    }

    .dd-jersey-banner-badge svg {
        width: 40px;
        height: 40px;
    }

    .dd-jersey-banner-content {
        text-align: center;
    }

    .dd-jersey-banner-subtitle {
        font-size: 15px;
    }

    .dd-jersey-banner-button {
        justify-self: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dd-jersey-banner,
    .dd-jersey-banner::before,
    .dd-jersey-banner-kicker::before,
    .dd-jersey-banner-button {
        animation: none;
        transition: none;
    }
}
