/* explore.css - Claymorphism Style - Responsive Update */

/* ==================== BASE RESET ==================== */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ==================== MAIN CONTAINER ==================== */
.explore-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    min-height: 80vh;
    font-family: 'Outfit', sans-serif;
}

/* ==================== PAGE TITLE ==================== */
.explore-title {
    text-align: center;
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 700;
    color: #5a3d7a;
    margin-bottom: 50px;
    padding: 24px 32px;
    background: linear-gradient(145deg, #fff5e6, #ffe4cc);
    border-radius: 24px;
    box-shadow:
        8px 8px 16px rgba(0, 0, 0, 0.1),
        -8px -8px 16px rgba(255, 255, 255, 0.9),
        inset 2px 2px 4px rgba(255, 255, 255, 0.8),
        inset -2px -2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.6);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

/* ==================== PRODUCT GRID ==================== */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding: 10px;
}

/* ==================== PRODUCT CARD ==================== */
.explore-card {
    text-decoration: none;
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.12),
        -10px -10px 20px rgba(255, 255, 255, 0.9),
        inset 2px 2px 4px rgba(255, 255, 255, 0.7),
        inset -2px -2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    position: relative;
}

.explore-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0) 50%);
    border-radius: 28px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.explore-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        16px 16px 32px rgba(0, 0, 0, 0.15),
        -16px -16px 32px rgba(255, 255, 255, 0.95),
        inset 3px 3px 6px rgba(255, 255, 255, 0.8),
        inset -2px -2px 4px rgba(0, 0, 0, 0.05);
}

.explore-card:hover::before {
    opacity: 1;
}

.explore-card:active {
    transform: translateY(-4px) scale(0.99);
    box-shadow:
        6px 6px 12px rgba(0, 0, 0, 0.1),
        -6px -6px 12px rgba(255, 255, 255, 0.8),
        inset 4px 4px 8px rgba(0, 0, 0, 0.05),
        inset -4px -4px 8px rgba(255, 255, 255, 0.6);
}

/* ==================== IMAGE WRAPPER ==================== */
.explore-image-wrapper {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(145deg, #fff8f0, #ffefdf);
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.04),
        inset -4px -4px 8px rgba(255, 255, 255, 0.8);
}

.explore-image-wrapper::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.explore-card:hover .explore-image-wrapper::after {
    opacity: 1;
}

/* ==================== PRODUCT IMAGE ==================== */
.explore-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    transition: transform 0.4s ease;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.1));
}

.explore-card:hover .explore-image {
    transform: scale(1.08) rotate(2deg);
}

/* ==================== NO IMAGE PLACEHOLDER ==================== */
.explore-no-image {
    font-size: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: linear-gradient(145deg, #ffe4ec, #ffd1dc);
    border-radius: 50%;
    box-shadow:
        6px 6px 12px rgba(0, 0, 0, 0.08),
        -6px -6px 12px rgba(255, 255, 255, 0.9),
        inset 2px 2px 4px rgba(255, 255, 255, 0.7),
        inset -2px -2px 4px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.explore-card:hover .explore-no-image {
    transform: scale(1.1) rotate(-5deg);
    animation: explore-wiggle 0.5s ease-in-out;
}

@keyframes explore-wiggle {
    0%,
    100% {
        transform: scale(1.1) rotate(-5deg);
    }
    25% {
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(3deg);
    }
}

/* ==================== PRODUCT DETAILS ==================== */
.explore-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(145deg, #e8f5e9, #d4edda);
    flex: 1;
}

/* ==================== PRODUCT NAME ==================== */
.explore-name {
    font-size: clamp(0.95rem, 2vw, 1.125rem);
    font-weight: 600;
    color: #3d5a3d;
    line-height: 1.4;
    padding: 12px 14px;
    background: linear-gradient(145deg, #f0fff0, #e0f5e0);
    border-radius: 14px;
    box-shadow:
        4px 4px 8px rgba(0, 0, 0, 0.06),
        -4px -4px 8px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8),
        inset -1px -1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.explore-card:hover .explore-name {
    background: linear-gradient(145deg, #fff5f0, #ffe8dc);
    color: #5a3d3d;
}

/* ==================== PRODUCT PRICE ==================== */
.explore-price {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 700;
    color: #fff;
    padding: 12px 16px;
    background: linear-gradient(145deg, #7ecb7e, #5cb85c);
    border-radius: 14px;
    text-align: center;
    box-shadow:
        5px 5px 10px rgba(0, 0, 0, 0.1),
        -5px -5px 10px rgba(255, 255, 255, 0.4),
        inset 2px 2px 4px rgba(255, 255, 255, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.1);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.explore-card:hover .explore-price {
    background: linear-gradient(145deg, #ff9a7a, #ff7a5a);
    transform: scale(1.03);
    box-shadow:
        6px 6px 14px rgba(0, 0, 0, 0.12),
        -6px -6px 14px rgba(255, 255, 255, 0.5),
        inset 2px 2px 4px rgba(255, 255, 255, 0.4),
        inset -2px -2px 4px rgba(0, 0, 0, 0.1);
}

/* ==================== EMPTY STATE MESSAGE ==================== */
.explore-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(145deg, #f5f0ff, #ebe0ff);
    border-radius: 28px;
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.08),
        -10px -10px 20px rgba(255, 255, 255, 0.9),
        inset 2px 2px 4px rgba(255, 255, 255, 0.7),
        inset -2px -2px 4px rgba(0, 0, 0, 0.02);
}

.explore-empty-icon {
    font-size: 72px;
    margin-bottom: 20px;
    display: block;
    animation: explore-float 3s ease-in-out infinite;
}

@keyframes explore-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.explore-empty-text {
    font-size: clamp(1rem, 2vw, 1.375rem);
    color: #6b4c9a;
    font-weight: 500;
}

/* Inline empty state styling */
.explore-grid p[style] {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(145deg, #f5f0ff, #ebe0ff);
    border-radius: 28px;
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.08),
        -10px -10px 20px rgba(255, 255, 255, 0.9),
        inset 2px 2px 4px rgba(255, 255, 255, 0.7);
    font-size: 1.2rem !important;
    color: #6b4c9a !important;
    font-weight: 500;
}

/* ==================== LOADING SKELETON ==================== */
.explore-skeleton {
    background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
    border-radius: 28px;
    height: 340px;
    position: relative;
    overflow: hidden;
    box-shadow:
        8px 8px 16px rgba(0, 0, 0, 0.08),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
}

.explore-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: explore-shimmer 1.5s infinite;
}

@keyframes explore-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

/* Large Desktop */
@media (max-width: 1400px) {
    .explore-container {
        padding: 36px 20px 56px;
    }

    .explore-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .explore-title {
        margin-bottom: 40px;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    .explore-container {
        padding: 32px 20px 48px;
    }

    .explore-title {
        padding: 20px 28px;
        margin-bottom: 36px;
        border-radius: 22px;
    }

    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
        padding: 8px;
    }

    .explore-card {
        border-radius: 24px;
    }

    .explore-image-wrapper {
        height: 180px;
        padding: 18px;
    }

    .explore-no-image {
        width: 100px;
        height: 100px;
        font-size: 52px;
    }

    .explore-details {
        padding: 18px;
        gap: 10px;
    }

    .explore-name {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .explore-price {
        padding: 10px 14px;
        border-radius: 12px;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .explore-container {
        padding: 24px 16px 40px;
    }

    .explore-title {
        font-size: 1.75rem;
        padding: 18px 24px;
        border-radius: 20px;
        margin-bottom: 28px;
    }

    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 6px;
    }

    .explore-card {
        border-radius: 22px;
    }

    .explore-card::before {
        border-radius: 22px;
    }

    .explore-image-wrapper {
        height: 160px;
        padding: 16px;
    }

    .explore-no-image {
        width: 90px;
        height: 90px;
        font-size: 46px;
    }

    .explore-details {
        padding: 16px;
        gap: 10px;
    }

    .explore-name {
        padding: 10px 12px;
        border-radius: 11px;
        font-size: 0.95rem;
    }

    .explore-price {
        padding: 10px 14px;
        border-radius: 11px;
        font-size: 1.1rem;
    }

    .explore-empty {
        padding: 48px 28px;
        border-radius: 24px;
    }

    .explore-empty-icon {
        font-size: 60px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .explore-container {
        padding: 20px 12px 36px;
    }

    .explore-title {
        font-size: 1.5rem;
        padding: 16px 20px;
        border-radius: 18px;
        margin-bottom: 24px;
    }

    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 4px;
    }

    .explore-card {
        border-radius: 20px;
    }

    .explore-card::before {
        border-radius: 20px;
    }

    .explore-image-wrapper {
        height: 140px;
        padding: 14px;
    }

    .explore-no-image {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }

    .explore-details {
        padding: 14px;
        gap: 8px;
    }

    .explore-name {
        padding: 8px 10px;
        border-radius: 10px;
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .explore-price {
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .explore-empty {
        padding: 40px 20px;
        border-radius: 20px;
    }

    .explore-empty-icon {
        font-size: 52px;
        margin-bottom: 16px;
    }

    .explore-empty-text {
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 400px) {
    .explore-container {
        padding: 16px 10px 32px;
    }

    .explore-title {
        font-size: 1.35rem;
        padding: 14px 18px;
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 2px;
    }

    .explore-card {
        border-radius: 18px;
    }

    .explore-image-wrapper {
        height: 120px;
        padding: 12px;
    }

    .explore-no-image {
        width: 70px;
        height: 70px;
        font-size: 34px;
    }

    .explore-details {
        padding: 12px;
        gap: 8px;
    }

    .explore-name {
        padding: 8px;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .explore-price {
        padding: 8px 10px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
}

/* Extra Small Mobile */
@media (max-width: 320px) {
    .explore-container {
        padding: 14px 8px 28px;
    }

    .explore-title {
        font-size: 1.2rem;
        padding: 12px 14px;
        border-radius: 14px;
        margin-bottom: 18px;
    }

    .explore-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .explore-card {
        border-radius: 20px;
    }

    .explore-image-wrapper {
        height: 160px;
        padding: 16px;
    }

    .explore-no-image {
        width: 90px;
        height: 90px;
        font-size: 44px;
    }

    .explore-details {
        padding: 16px;
        gap: 10px;
    }

    .explore-name {
        padding: 10px 12px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .explore-price {
        padding: 10px 14px;
        font-size: 1.05rem;
        border-radius: 10px;
    }
}

/* ==================== TOUCH DEVICE ADJUSTMENTS ==================== */
@media (hover: none) {
    .explore-card:hover {
        transform: none;
        box-shadow:
            10px 10px 20px rgba(0, 0, 0, 0.12),
            -10px -10px 20px rgba(255, 255, 255, 0.9),
            inset 2px 2px 4px rgba(255, 255, 255, 0.7),
            inset -2px -2px 4px rgba(0, 0, 0, 0.03);
    }

    .explore-card:hover::before {
        opacity: 0;
    }

    .explore-card:hover .explore-image {
        transform: none;
    }

    .explore-card:hover .explore-no-image {
        transform: none;
        animation: none;
    }

    .explore-card:hover .explore-price {
        transform: none;
        background: linear-gradient(145deg, #7ecb7e, #5cb85c);
    }

    .explore-card:hover .explore-name {
        background: linear-gradient(145deg, #f0fff0, #e0f5e0);
        color: #3d5a3d;
    }

    .explore-card:active {
        transform: scale(0.98);
    }

    .explore-card:active .explore-price {
        background: linear-gradient(145deg, #ff9a7a, #ff7a5a);
    }
}

/* ==================== LANDSCAPE MOBILE ==================== */
@media (max-width: 768px) and (orientation: landscape) {
    .explore-container {
        padding: 20px 24px 36px;
    }

    .explore-title {
        margin-bottom: 24px;
    }

    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .explore-image-wrapper {
        height: 130px;
    }

    .explore-no-image {
        width: 70px;
        height: 70px;
        font-size: 34px;
    }

    .explore-details {
        padding: 14px;
    }
}

@media (max-width: 576px) and (orientation: landscape) {
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== ACCESSIBILITY ==================== */
.explore-card:focus {
    outline: 3px solid #5a3d7a;
    outline-offset: 3px;
}

.explore-card:focus-visible {
    outline: 3px solid #5a3d7a;
    outline-offset: 3px;
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    .explore-card {
        transition: none;
    }

    .explore-card:hover {
        transform: none;
    }

    .explore-image {
        transition: none;
    }

    .explore-no-image {
        transition: none;
    }

    .explore-card:hover .explore-no-image {
        animation: none;
    }

    .explore-name,
    .explore-price {
        transition: none;
    }

    .explore-empty-icon {
        animation: none;
    }

    .explore-skeleton::after {
        animation: none;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .explore-container {
        padding: 20px;
    }

    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .explore-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .explore-title {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .explore-card:hover {
        transform: none;
    }
}