/* =================================== */
/*          Quick View Styles          */
/* =================================== */

/* 1. Quick View Button
------------------------------------ */
.product-img-wrapper {
    /* Ensure the wrapper can contain a positioned element */
    position: relative;
}

.quick-view-btn {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translate(-50%, 20px); /* Start off-screen */
    opacity: 0;
    visibility: hidden;
    
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    border: 1px solid var(--light-gray);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(5px);
}

.product-card:hover .quick-view-btn {
    transform: translate(-50%, 0); /* Move into view */
    opacity: 1;
    visibility: visible;
}

.quick-view-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 2. Side Menu (Off-canvas Panel)
------------------------------------ */
.quick-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999; /* Below the side menu */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.quick-view-overlay.active {
    opacity: 1;
    visibility: visible;
}

.quick-view-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px; /* Adjust as needed */
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.quick-view-panel.active {
    transform: translateX(0);
}

.quick-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.75rem; /* Extreme padding reduction */
    border-bottom: 1px solid var(--light-gray);
}

.quick-view-header h3 {
    font-size: 0.85rem; /* Extreme font size reduction */
}

.quick-view-close-btn {
    background: none;
    border: none;
    font-size: 0.9rem; /* Extreme icon size reduction */
    cursor: pointer;
    color: var(--gray);
}

.quick-view-content {
    padding: 0; /* Base padding is removed for gallery */
}

/* 3. Styles for Content Inside Panel (mimicking details.css)
------------------------------------------------------------- */
.quick-view-content {
    padding: 0; /* Remove padding to allow gallery to be full-width */
}

/* New styles for the top summary section */
.quick-view-summary {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--light-gray);
}

.summary-info {
    display: flex;
    flex-direction: column;
}

.summary-info .product-title {
    font-size: 1rem;
    margin-bottom: 0.1rem;
}

.summary-info .product-price {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.view-details-link {
    /* Professional Link Styling */
    font-size: 0.8rem;
    color: var(--gray); /* More subtle base color */
    text-decoration: none;
    font-weight: 600;
    display: inline-flex; /* Aligns text and icon */
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease, gap 0.2s ease; /* Smooth transition */
}

.view-details-link::after {
    content: '→'; /* Adds a small arrow icon */
    font-size: 1.1em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.view-details-link:hover {
    color: var(--primary); /* Highlight color on hover */
    text-decoration: underline;
}

.view-details-link:hover::after {
    transform: translateX(3px); /* Moves arrow slightly on hover */
}

.product-gallery {
    padding: 0; /* Reset padding */
}

.product-gallery .product-main-image {
    width: 80px; /* Smaller image */
    height: 80px; /* Smaller image */
    object-fit: cover;
    border-radius: var(--border-radius);
}

.product-info-details {
    padding: 0.4rem 0.75rem; /* Extreme padding reduction */
}

.product-info-details .product-description {
    color: var(--gray);
    margin-bottom: 0.4rem; /* Extreme margin reduction */
    line-height: 1.3; /* Extreme line height reduction */
    font-size: 0.8rem; /* Extreme font size reduction */
}

.product-meta {
    font-size: 0.8rem;
    color: var(--gray);
    background-color: var(--light);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem; /* Extreme gap reduction */
    margin-bottom: 0.6rem; /* Extreme margin reduction */
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem; /* Increased margin for better spacing */
    display: block;
    color: var(--dark);
}

/* Color & Size Selectors */
.color-selector, .size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* Increased gap for clarity */
}

.color-selector input, .size-selector input {
    display: none; /* Hide the actual radio button */
}

.color-swatch {
    width: 28px; /* Slightly larger for better touch targets */
    height: 28px; /* Slightly larger for better touch targets */
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--light-gray);
    transition: var(--transition);
    display: inline-block;
    position: relative;
}

.color-selector input:checked + .color-swatch {
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Modern checkmark for selected color */
.color-selector input:checked + .color-swatch::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.size-tag {
    padding: 0.5rem 1rem; /* Increased padding for readability */
    border: 1px solid var(--light-gray);
    border-radius: 8px; /* Modern squared-off radius */
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.8rem; /* Smaller font for tags */
}

.size-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.size-selector input:checked + .size-tag {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Add to Cart Section */
.add-to-cart-section {
    display: flex;
    gap: 1rem; /* Increased gap */
    align-items: center;
    margin-top: 1.5rem; /* More space above */
    /* Add horizontal line and padding */
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 1rem;
}

.btn-add-to-cart {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem; /* More balanced padding */
    font-size: 0.9rem;
    /* Add subtle gradient and inner shadow for depth */
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-add-to-cart:hover {
    background: linear-gradient(to bottom, #000, #111); /* A slightly darker gradient on hover */
    transform: translateY(0); /* Override default button hover transform */
}

.btn-add-to-cart .fa-shopping-cart {
    transition: transform 0.2s ease;
}

.btn-add-to-cart:hover .fa-shopping-cart {
    transform: translateX(3px);
}

.add-to-cart-feedback {
    text-align: center;
    color: var(--success);
    font-weight: 600;
    /* margin-top is handled by add-to-cart-section's margin-bottom */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Re-using quantity control styles from order.css */
.quantity-control {
    display: flex;
    align-items: center;
    background-color: var(--light);
    border-radius: 8px;
}

.quick-view-content .quantity-control button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    width: 36px; /* Larger touch area */
    height: 36px; /* Larger touch area */
    color: var(--gray);
    transition: var(--transition);
    border-radius: 8px;
}

.quick-view-content .quantity-control button:hover {
    color: var(--primary);
}

.quick-view-content .quantity-control span {
    font-weight: 600;
    padding: 0 0.5rem; /* More horizontal space */
    font-size: 0.9rem; /* Smaller font */
}

/* 4. Delivery Info Section
------------------------------------ */
.delivery-info {
    background: var(--light);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 1.5rem;
}

.delivery-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.delivery-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(74,108,247,0.1);
    color: var(--primary);
    font-size: 0.9rem;
}

.delivery-title {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark);
}

.delivery-sub {
    margin: 0;
    color: var(--gray);
    font-size: 0.8rem;
}