/**
 * Wishlist & Quick View — Styles
 *
 * Overlay icons on product cards, quick view modal, wishlist page.
 * Uses Gloria Eterna Store design tokens.
 */

/* ===== PRODUCT CARD OVERLAY ===== */

.gloria-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gloria-product-card:hover .gloria-card-actions,
.gloria-product-card:focus-within .gloria-card-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile: always show */
@media (max-width: 768px) {
    .gloria-card-actions {
        opacity: 1;
        transform: translateX(0);
    }
}

.gloria-card-actions button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #e2e2e2;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gloria-card-actions button:hover {
    background: rgba(219, 175, 74, 0.9);
    color: #131313;
    border-color: #dbaf4a;
    transform: scale(1.1);
}

.gloria-card-actions button svg,
.gloria-card-actions button i {
    width: 16px;
    height: 16px;
}

/* Heart active state (filled) */
.gloria-wishlist-toggle.is-active {
    background: rgba(239, 68, 68, 0.9) !important;
    color: #fff !important;
    border-color: #ef4444 !important;
}

.gloria-wishlist-toggle.is-active svg {
    fill: currentColor;
}

/* ===== QUICK VIEW MODAL ===== */

.gloria-quickview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gloria-quickview-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.gqv-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.gqv-container {
    position: relative;
    z-index: 1;
    max-width: 960px;
    width: 92%;
    max-height: 90vh;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}

.gloria-quickview-modal.is-open .gqv-container {
    transform: scale(1) translateY(0);
}

.gqv-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 50%;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.gqv-close:hover {
    background: #333;
    color: #fff;
}

.gqv-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: 85vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .gqv-body {
        grid-template-columns: 1fr;
    }
}

/* Loading */
.gqv-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.gqv-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #dbaf4a;
    border-radius: 50%;
    animation: gqv-spin 0.8s linear infinite;
}

@keyframes gqv-spin {
    to { transform: rotate(360deg); }
}

/* Gallery */
.gqv-gallery {
    background: #131313;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gqv-main-img {
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 8px;
    background: #1a1a1a;
}

.gqv-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gqv-main-img:hover img {
    transform: scale(1.05);
}

.gqv-thumbs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.gqv-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    background: none;
    padding: 0;
}

.gqv-thumb.is-active,
.gqv-thumb:hover {
    border-color: #dbaf4a;
    opacity: 1;
}

.gqv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info panel */
.gqv-info {
    padding: 1.5rem;
    overflow-y: auto;
}

.gqv-category {
    display: inline-block;
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #dbaf4a;
    margin-bottom: 0.5rem;
}

.gqv-title {
    font-family: Montserrat, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.gqv-badge {
    display: inline-block;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.gqv-badge-oos {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.gqv-badge-low {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* Price */
.gqv-price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 0.25rem;
}

.gqv-pix-price {
    font-family: Montserrat, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #dbaf4a;
}

.gqv-pix-label {
    font-family: Ubuntu, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #dbaf4a;
}

.gqv-regular-price {
    font-family: Ubuntu, sans-serif;
    font-size: 14px;
    color: #aaa;
    margin: 0 0 0.25rem;
}

.gqv-installments {
    font-family: Ubuntu, sans-serif;
    font-size: 12px;
    color: #777;
    margin: 0 0 1rem;
}

/* Variations */
.gqv-variation-group {
    margin-bottom: 1rem;
}

.gqv-variation-label {
    display: block;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.gqv-variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gqv-size-btn {
    padding: 6px 14px;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    background: transparent;
    color: #ccc;
    font-family: Ubuntu, sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.gqv-size-btn:hover {
    border-color: #dbaf4a;
    color: #dbaf4a;
}

.gqv-size-btn.is-active {
    border-color: #dbaf4a;
    background: rgba(219, 175, 74, 0.1);
    color: #dbaf4a;
}

/* Description */
.gqv-desc {
    font-family: Ubuntu, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #999;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #2a2a2a;
}

/* Add to cart row */
.gqv-add-row {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.gqv-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.gqv-qty-btn {
    width: 36px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
}

.gqv-qty-btn:hover {
    color: #dbaf4a;
}

.gqv-qty-input {
    width: 40px;
    height: 40px;
    text-align: center;
    background: transparent;
    border: none;
    border-left: 1px solid #2a2a2a;
    border-right: 1px solid #2a2a2a;
    color: #fff;
    font-family: Ubuntu, sans-serif;
    font-size: 14px;
    outline: none;
    -moz-appearance: textfield;
}

.gqv-qty-input::-webkit-inner-spin-button,
.gqv-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gqv-add-to-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    background: linear-gradient(135deg, #9a7d2e 0%, #dbaf4a 40%, #f4e1b3 100%);
    color: #131313;
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gqv-add-to-cart:hover {
    opacity: 0.9;
}

.gqv-add-to-cart svg,
.gqv-add-to-cart i {
    width: 16px;
    height: 16px;
}

.gqv-add-to-cart.gqv-disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

/* Actions row */
.gqv-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #2a2a2a;
}

.gqv-wishlist-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #999;
    font-family: Ubuntu, sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
}

.gqv-wishlist-btn:hover {
    color: #ef4444;
}

.gqv-wishlist-btn svg,
.gqv-wishlist-btn i {
    width: 16px;
    height: 16px;
}

.gqv-wishlist-btn.is-active {
    color: #ef4444;
}

.gqv-wishlist-btn.is-active svg {
    fill: currentColor;
}

.gqv-view-full {
    font-family: Ubuntu, sans-serif;
    font-size: 12px;
    color: #dbaf4a;
    text-decoration: none;
    transition: opacity 0.2s;
}

.gqv-view-full:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===== WISHLIST PAGE ===== */

.gloria-wishlist-page {
    min-height: 50vh;
    padding: 2rem 0;
}

.gloria-wishlist-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    text-align: center;
    gap: 1rem;
    color: #999;
    font-family: Ubuntu, sans-serif;
}

.gloria-wishlist-empty-icon {
    width: 64px;
    height: 64px;
    color: #333;
}

.gloria-wishlist-empty p {
    font-size: 15px;
    color: #999;
}

.gloria-wishlist-shop-btn {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #9a7d2e 0%, #dbaf4a 40%, #f4e1b3 100%);
    color: #131313;
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.gloria-wishlist-shop-btn:hover {
    opacity: 0.9;
}

.gloria-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .gloria-wishlist-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.gloria-wishlist-item {
    transition: opacity 0.3s, transform 0.3s;
}

.gloria-wishlist-item-img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #1a1a1a;
    margin-bottom: 0.5rem;
}

.gloria-wishlist-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gloria-wishlist-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.gloria-wishlist-remove:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.gloria-wishlist-remove svg,
.gloria-wishlist-remove i {
    width: 14px;
    height: 14px;
}

.gloria-wishlist-item-info {
    display: block;
    text-decoration: none;
}

.gloria-wishlist-item-info h4 {
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gloria-wishlist-item-cat {
    font-family: Ubuntu, sans-serif;
    font-size: 11px;
    color: #666;
    margin: 0 0 4px;
}

.gloria-wishlist-item-price {
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #dbaf4a;
    margin: 0;
}

/* ===== HEADER WISHLIST BADGE ===== */

.gloria-wishlist-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
