/* ==========================================================================
   Trunk Page Specific Styles
   Author: applchu
   ========================================================================== */

/* Premium Store Design */
:root {
    --primary-color: #ea6a97; /* Pink from style.css */
    --primary-variant: #ff38a2;
    --secondary-color: #70399b; /* Purple from style.css */
    --bg-color: #231d33; /* Content background from style.css */
    --surface-color: #1a1525;
    --error-color: #cf6679;
    --on-primary: #ffffff;
    --on-secondary: #ffffff;
    --on-bg: #ffffff;
    --on-surface: #e0e0e0;
    --glass-bg: rgba(35, 29, 51, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.trunk-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Poppins', sans-serif;
    color: var(--on-bg);
}

/* Terry's Intro Header */
.terry-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.terry-text-content {
    flex: 1;
    z-index: 1;
    padding-right: 2rem;
}

.terry-title {
    font-family: 'Dimbo', cursive, sans-serif;
    font-size: 4rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
    text-align: center;
}

.terry-separator {
    border: none;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 1.5rem 0;
}

.terry-desc {
    font-family: 'Dimbo', cursive, sans-serif;
    font-size: 1.5rem;
    line-height: 1.4;
    text-align: center;
    color: white;
	letter-spacing: 1px;
}

.terry-image-container {
    flex: 0 0 500px;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.terry-image-container img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.6));
    animation: scBounce 4s ease-in-out infinite;
}

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

/* Shop Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Sidebar Filters */
.shop-sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0;
    padding: 1.5rem;
    height: max-content;
    position: sticky;
    top: 20px;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 0;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.category-list, .sort-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li, .sort-list li {
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: white;
    transition: color 0.2s;
}

.checkbox-label:hover {
    color: var(--primary-color);
}

.checkbox-label input {
    margin-right: 10px;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.price-slider {
    width: 100%;
    accent-color: var(--primary-color);
}

.price-range-display {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: white;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover:not(.placeholder) {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.product-image-wrapper {
    overflow: hidden;
    position: relative;
    background: rgba(0,0,0,0.2);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    padding: 1.5rem;
    border-bottom: none;
    transition: transform 0.5s;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.2rem * 1.2 * 2); /* Reserve space for 2 lines */
}

.product-category {
    font-size: 0.85rem;
    color: #bbb;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    margin-top: auto;
    margin-bottom: 1rem;
}

.add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 12px 10px;
    border: none;
    border-radius: 5px;
    background-color: var(--secondary-color);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
}

.add-to-cart-btn:hover {
    background-color: #8c4dbb;
}

/* Skeleton Loading State */
.skeleton-loading .product-title,
.skeleton-loading .product-category,
.skeleton-loading .product-price,
.skeleton-loading .add-to-cart-btn {
    color: transparent !important;
    background: #15111e !important;
    background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.02) 20%, rgba(255,255,255,0.05) 60%, rgba(255,255,255,0)) !important;
    background-size: 200% 100% !important;
    animation: shimmer 1.5s infinite linear !important;
    border-radius: 4px;
    border: none !important;
    box-shadow: none !important;
}

.skeleton-loading .product-image {
    visibility: hidden; /* Hide the img tag so it doesn't show */
}

.skeleton-loading .product-image-wrapper {
    background: #15111e !important;
    background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.02) 20%, rgba(255,255,255,0.05) 60%, rgba(255,255,255,0)) !important;
    background-size: 200% 100% !important;
    animation: shimmer 1.5s infinite linear !important;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Grid Placeholder (Empty slot) */
.product-card.placeholder {
    background: var(--surface-color);
    border: 1px dashed var(--glass-border);
    justify-content: center;
    align-items: center;
    min-height: 440px; /* Approximate height of a standard card */
    box-shadow: none;
}
.product-card.placeholder:hover {
    transform: none;
    border-color: var(--glass-border);
}
.product-card.placeholder .question-mark {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
    font-family: 'Dimbo', cursive, sans-serif;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    width: 100%;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 0;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }
    .terry-intro {
        flex-direction: column;
    }
    .terry-text-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    .terry-image-container {
        flex-basis: auto;
    }
}
/* Fix sidebar sticking when WP admin bar is present */
.shop-sidebar {
    top: calc(20px + var(--wp-admin--admin-bar--height, 0px));
}
body.admin-bar .shop-sidebar {
    top: calc(20px + 32px); /* Fallback if var isn't set */
}

.clear-filters-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.4);
}

/* Featured Gift Card Banner */
.featured-gift-card {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #152736 0%, #113342 100%);
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgb(255 255 255 / 7%);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gc-image-container {
    flex: 0 0 40%;
    position: relative;
}

.gc-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
	padding: 20px;
    animation: gc-wiggle 5s ease-in-out infinite;
    transform-origin: center center;
}

@keyframes gc-wiggle {
    0%, 80%, 100% {
        transform: rotate(0deg);
    }
    82% { transform: rotate(-5deg); }
    84% { transform: rotate(5deg); }
    86% { transform: rotate(-5deg); }
    88% { transform: rotate(4deg); }
    90% { transform: rotate(-2deg); }
    92% { transform: rotate(0deg); }
}

.gc-text-container {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    color: white;
}

.gc-text-container h3 {
    font-family: 'Dimbo', cursive, sans-serif;
    font-size: 3rem;
    margin: 0 0 1rem 0;
    color: #fff;
	text-align: right;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    letter-spacing: 3px;
}

.gc-text-container p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
	text-align: right;
    color: #e0f7fa;
}

.gc-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.gc-buy-btn {
    align-self: flex-end;
    padding: 12px 24px;
    background-color: #70399b;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    border-radius: 6px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: none;
    margin-top: auto;
}

.gc-buy-btn:hover {
    background-color: #00b3a6;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
    .featured-gift-card {
        flex-direction: column;
    }
    .gc-image-container {
        flex: 1;
    }
    .gc-image-container img {
        border-right: none;
        border-bottom: 2px solid rgba(255,255,255,0.1);
    }
    .gc-buy-btn {
        width: 100%;
        text-align: center;
    }
}
