/* 
   Healthy-Core Components
   Premium UI elements for the bespoke e-commerce experience.
*/

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-sm);
    margin-top: 2rem;
}

/* --- Product Card --- */
.product-card {
    background: var(--luxury-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle definition */
    border-radius: var(--radius-soft);
    overflow: hidden;
    transition: var(--transition-slow);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-btn);
    border-color: var(--luxury-gold);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Area */
.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9f9f9;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.08);
    /* Slow luxurious zoom */
}

/* Badges */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--luxury-black);
    color: var(--luxury-white);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 6px 12px;
    z-index: 2;
}

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

/* Wishlist Icon */
.product-wishlist {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    opacity: 0;
    transform: translateX(10px);
}

.product-card:hover .product-wishlist {
    opacity: 1;
    transform: translateX(0);
}

.product-wishlist:hover {
    background: var(--luxury-gold);
    color: var(--luxury-white);
}

.product-wishlist.active svg {
    fill: var(--luxury-gold);
    stroke: var(--luxury-gold);
}

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

.product-brand {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--luxury-gold);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    color: var(--luxury-black);
    line-height: 1.3;
}

/* Ratings */
.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.stars {
    color: var(--luxury-gold);
    letter-spacing: 2px;
}

.rating-count {
    color: #999;
    font-size: 0.8rem;
}

/* Price */
.product-price-container {
    margin-top: auto;
    /* Push to bottom of content area */
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.actual-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--luxury-black);
}

.old-price,
.mrp {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: #999;
}

/* Action Button */
.btn-add-to-cart {
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: 1px solid var(--luxury-black);
    color: var(--luxury-black);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-add-to-cart:hover {
    background: var(--luxury-black);
    color: var(--luxury-white);
}

/* --- Search Overlay Components --- */
/* Trending Grid (Moved from search.css if needed, but keeping basic for now) */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Royal Dropdown --- */
.royal-dropdown-wrapper {
    margin-bottom: 1.2rem;
    position: relative;
    width: 100%;
}

.royal-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--luxury-black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.royal-dropdown:hover,
.royal-dropdown.open {
    border-color: var(--luxury-gold);
    background: rgba(212, 175, 55, 0.02);
}

.royal-dropdown-icon {
    transition: transform 0.3s ease;
    color: var(--luxury-gold);
}

.royal-dropdown.open .royal-dropdown-icon {
    transform: rotate(180deg);
}

.royal-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--luxury-white);
    border: 1px solid var(--luxury-gold);
    border-top: none;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.royal-dropdown-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.royal-option {
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.royal-option:last-child {
    border-bottom: none;
}

.royal-option:hover {
    background: rgba(212, 175, 55, 0.05);
    color: var(--luxury-gold);
}

.royal-option.active {
    background: var(--luxury-black);
    color: var(--luxury-gold);
}

.custom-weight-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 14px;
    background: #fcfcfc;
    border: 1px solid rgba(212, 175, 55, 0.4);
    margin-bottom: 1.2rem;
    border-top: none;
}

.custom-weight-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    color: var(--luxury-black);
}

.weight-unit {
    color: var(--luxury-gold);
    font-weight: 700;
    font-size: 0.8rem;
}