/* ========================================
   PREMIUM PRODUCT CARDS - Luxury Design
   ======================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

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

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Product Image Container */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 aspect ratio */
    background: #f8f8f8;
    overflow: hidden;
}

.product-image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    /* Static positioning and no transition to stop all sliding/gliding effects */
    display: block;
    margin: auto;
}

/* Image micro-interaction transitions are defined in unified-cards.css to be theme-agnostic. */

/* Product Badge (New, Sale, etc.) */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-badge.sale {
    background: var(--danger);
}

.product-badge.new {
    background: var(--success);
}

/* Product Content */
.product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.product-price-old {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-decoration: line-through;
    margin-left: 8px;
}

/* Product CTA */
.product-cta {
    margin-top: auto;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.product-cta:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.product-cta:active {
    transform: translateY(0);
}

/* Stock Status */
.product-stock {
    font-size: 0.75rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-stock.in-stock {
    color: var(--success);
}

.product-stock.low-stock {
    color: var(--warning);
}

.product-stock.out-of-stock {
    color: var(--danger);
}

.product-stock i {
    font-size: 0.7rem;
}

/* Dark Mode Product Cards */
[data-theme="dark"] .product-card {
    background: #2d2d32;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .product-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 106, 0.15);
}

[data-theme="dark"] .product-image {
    background: #242428;
}

[data-theme="dark"] .product-title {
    color: #f5f5f7;
}

[data-theme="dark"] .product-category {
    color: #a1a1a6;
}

/* ========================================
   INTERACTIVE CATEGORY FILTERS
   ======================================== */

/* Tab Container */
.tabs {
    display: inline-flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Tab Item (with potential dropdown) */
.tab-item {
    position: relative;
    display: inline-block;
}

/* Tab Button */
.tab-btn {
    background: transparent;
    border: none;
    font-size: 0.9rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.tab-btn.active {
    background: var(--white);
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

/* Chevron Icon */
.chevron-icon {
    margin-left: 4px;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.tab-item:hover .chevron-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.tab-dropdown {
    position: absolute !important;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000 !important;
}

.tab-item:hover .tab-dropdown {
    opacity: 1;
    visibility: visible;
}

/* Force close dropdown after selection */
.tab-item.dropdown-closing .tab-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
}

/* Dropdown Item */
.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--light-gray);
    color: var(--accent-color);
    transform: translateX(4px);
}

/* Dark Mode Filters */
[data-theme="dark"] .tab-btn {
    color: #a1a1a6;
}

[data-theme="dark"] .tab-btn.active {
    background: #2d2d32;
    color: #f5f5f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #f5f5f7;
}

[data-theme="dark"] .tab-dropdown {
    background: #2a2a2c;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .dropdown-item {
    color: #f5f5f7;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #3a3a3c;
    color: #d4af6a;
}