/* Products Page Styles */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
	padding: 0 2rem;
}

.products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
    z-index: 1; 
}

.product-card.hidden-temporarily {
    opacity: 0;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.product-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-placeholder {
    font-size: 4.1rem;
    color: white;
    opacity: 0.9;
}

.product-info {
    padding: 2rem;
}

.product-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.status-available { background: #d4edda; color: #155724; }
.status-coming { background: #fff3cd; color: #856404; }

.product-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.1rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.product-description {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.product-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--light);
    color: var(--primary);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.product-card:hover .product-button {
    background: var(--primary);
    color: white;
}

/* ──────────────────────────────────────────────
   EXPANDED VIEW
   ────────────────────────────────────────────── */

.expanded-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light); 
    z-index: 2000;
    
    opacity: 0;
    pointer-events: none;
    
    transition: opacity 0.5s ease;
    overflow-y: auto;
}

.expanded-view.active {
    opacity: 1;
    pointer-events: all;
}

/* Content Fade Logic */
.view-content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.expanded-view.active .view-content {
    opacity: 1;
}

.close-view {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: white;
    border: 1px solid var(--border);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    
    /* Flexbox centering works perfectly with SVGs */
    display: flex;
    align-items: center;
    justify-content: center;
    
    color: var(--primary);
    cursor: pointer;
    z-index: 2005;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    
    /* ZERO out padding to prevent offset */
    padding: 0;
}

/* Target the SVG directly for the rotation */
.close-view svg {
    width: 28px; /* Adjustable size */
    height: 28px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    stroke-width: 2.5px; /* Make lines slightly thicker/bolder */
}

.close-view:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05); /* Only scale the circle */
}

.close-view:hover svg {
    transform: rotate(90deg); /* Rotate ONLY the icon */
}

/* ──────────────────────────────────────────────
   PHANTOM ELEMENTS (Animation Clones)
   ────────────────────────────────────────────── */
.phantom {
    position: fixed;
    z-index: 2100;
    transform-origin: top left;
    transition: 
        top 0.6s cubic-bezier(0.77, 0, 0.175, 1),
        left 0.6s cubic-bezier(0.77, 0, 0.175, 1),
        width 0.6s cubic-bezier(0.77, 0, 0.175, 1),
        height 0.6s cubic-bezier(0.77, 0, 0.175, 1),
        opacity 0.2s ease; /* FAST fade out */
    
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    pointer-events: none;
    overflow: hidden;
}

.phantom.closing {
    z-index: 2200;
}

.phantom-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px; 
}

.phantom-info {
    background: white;
    border-radius: 20px;
    padding: 2rem;
}

.phantom-inner-content {
    width: 100%;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.phantom.reveal-underneath {
    opacity: 0; /* Triggers the fade out */
}

.phantom.reveal-underneath .phantom-inner-content {
    opacity: 0; 
}

.phantom.closing .phantom-inner-content {
    opacity: 0; 
}

/* ──────────────────────────────────────────────
   VIEW DETAILS & ACTION AREA
   ────────────────────────────────────────────── */

.view-details {
    flex: 1;
    padding: 6rem 5rem;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--border);
}

.action-area {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem; 
}

.view-details .product-status {
    margin-bottom: 0;
    padding: 1rem 2rem; 
    height: auto;
    border-radius: 60px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.9rem;
    line-height: 1;
    margin-bottom: 2.5rem;
    color: var(--primary);
    letter-spacing: -1.5px;
}

.view-section {
    margin-bottom: 3rem;
}

.view-section h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
    color: var(--gray-light);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.6rem;
    display: block;
}

.view-section p {
    font-size: 1.25rem;
    color: var(--secondary);
    line-height: 1.8;
}

.specs-list {
    list-style: none;
    padding: 0;
}

.specs-list li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}

.specs-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}
/* Note Styling - Remove bullet points */
.specs-list li.spec-note {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--gray);
    margin-top: 0.2rem;
}

.specs-list li.spec-note::before {
    content: none;
    display: none;
}
/* ──────────────────────────────────────────────
   VIEW VISUALS (Carousel)
   ────────────────────────────────────────────── */

.view-content {
    display: flex;
    min-height: 100vh;
}

.view-visuals {
    flex: 1.2;
    background: transparent; 
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    perspective: 1200px;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: grab;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-track {
    position: relative;
    width: 320px;
    height: 420px;
    transform-style: preserve-3d;
}

.c-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6.1rem;
    background: white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    user-select: none;
    backface-visibility: hidden;
}

.carousel-controls {
    position: absolute;
    bottom: 50px;
    display: flex;
    gap: 24px;
    z-index: 20;
}

.c-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
}

.c-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

@media (max-width: 1100px) {
    .view-content { flex-direction: column; }
    .view-visuals { height: 50vh; min-height: 450px; }
    .view-details { padding: 4rem 10%; border-left: none; }
    .view-title { font-size: 2.9rem; }
    .action-area { flex-direction: column; align-items: flex-start; }
}

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