/* assets/css/ecommerce.css */

/* Navbar */
.brand-am {
    letter-spacing: 2px;
}
.nav-link {
    color: var(--am-charcoal) !important;
    position: relative;
    padding-bottom: 5px;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--am-electric-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after {
    width: 80%;
}
.nav-icon {
    transition: color 0.3s ease;
}
.nav-icon:hover {
    color: var(--am-electric-blue) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    background-color: var(--am-soft-grey);
    min-height: 80vh;
    display: flex;
    align-items: center;
}
.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.hero-visual {
    position: relative;
    height: 100%;
}
.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Category Cards */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.category-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.category-card .overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 40px 20px 20px;
    color: white;
}
.category-card .overlay h5 {
    color: white !important;
}
.category-card:hover {
    transform: scale(0.98);
}
.category-card:hover img {
    transform: scale(1.05);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.product-card {
    border: none;
    background: transparent;
    transition: all 0.3s ease;
}
.product-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--am-soft-grey);
    aspect-ratio: 3/4;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-action {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    transition: bottom 0.3s ease;
    padding: 15px;
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}
.product-card:hover .product-action {
    bottom: 0;
}
.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--am-white);
    color: var(--am-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}
.action-btn:hover {
    background: var(--am-charcoal);
    color: var(--am-white);
    transform: scale(1.1);
}
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--am-charcoal);
    color: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}
.product-badge.sale { background: var(--am-amber); }
.product-badge.new { background: var(--am-electric-blue); }

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
}
.product-title a {
    color: var(--am-charcoal);
    text-decoration: none;
}
.product-title a:hover {
    color: var(--am-electric-blue);
}
.product-price {
    font-weight: 600;
    font-size: 1.1rem;
}
.product-price .compare {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-right: 8px;
    font-weight: 400;
}

/* AM Discovery Feature */
.am-discovery-container {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #2a2a2a 0%, var(--am-near-black) 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
}
.am-center-monogram {
    font-size: 12rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: rgba(255,255,255,0.03);
    position: absolute;
    z-index: 1;
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
    0% { 
        text-shadow: 0 0 30px rgba(0, 86, 255, 0.1); 
        transform: scale(1); 
    }
    100% { 
        text-shadow: 0 0 80px rgba(0, 86, 255, 0.4); 
        transform: scale(1.05); 
        color: rgba(255,255,255,0.08);
    }
}
.discovery-nodes {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}
.discovery-node {
    position: absolute;
    width: auto;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.discovery-node:hover, .discovery-node.active {
    background: var(--am-electric-blue);
    border-color: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%) scale(1.15) !important;
    box-shadow: 0 15px 40px rgba(0, 86, 255, 0.4);
    z-index: 10;
}
.discovery-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
    z-index: 3;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.discovery-preview.show {
    opacity: 1;
    pointer-events: auto;
}
.discovery-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background-color: var(--am-near-black);
}
.footer-link {
    transition: color 0.2s ease;
}
.footer-link:hover {
    color: var(--am-white) !important;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--am-white);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
.loader-letters {
    display: flex;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 4rem;
    color: var(--am-charcoal);
    overflow: hidden;
}
.loader-letters span {
    display: inline-block;
    transform: translateY(100%);
    animation: slideUp 0.8s forwards;
}
.loader-letters span:nth-child(2) {
    animation-delay: 0.1s;
}
.loader-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--am-charcoal);
    margin-top: 10px;
    opacity: 0;
    animation: fadeIn 0.5s 0.8s forwards;
}
@keyframes slideUp {
    to { transform: translateY(0); }
}
@keyframes fadeIn {
    to { opacity: 1; }
}
