/* ===== HOMEPAGE ===== */
.homepage {
    display: none;
    opacity: 0;
}

.homepage.visible {
    display: block;
    animation: fadeIn 0.8s var(--ease-power) forwards;
}

/* ===== HERO ===== */
.hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
    background: var(--white);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image:
        radial-gradient(circle at 20% 50%, var(--blue-500) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, var(--blue-500) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 40%, rgba(0, 82, 204, 0.04) 0%, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--blue-600);
    margin-bottom: var(--space-lg);
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--blue-500);
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.5px;
    color: var(--grey-900);
    margin-bottom: var(--space-lg);
}

.hero h1 span {
    color: var(--blue-500);
    position: relative;
}

.hero p {
    font-size: 1.05rem;
    color: var(--grey-400);
    max-width: 460px;
    margin-bottom: var(--space-xl);
    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: var(--space-3xl);
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--grey-100);
}

.hero-stat .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--grey-900);
}

.hero-stat .stat-label {
    font-size: 0.78rem;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ===== CATEGORIES ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.category-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    transition: var(--transition-med);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: var(--blue-500);
    box-shadow: var(--shadow-blue);
}

.category-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-md);
    background: var(--blue-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-med);
    overflow: hidden;
}

.category-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.category-card:hover .category-icon {
    background: var(--blue-500);
}

.category-card:hover .category-icon img {
    filter: brightness(0) invert(1);
}

.category-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--grey-700);
    margin-bottom: 4px;
}

.category-card .cat-count {
    font-size: 0.78rem;
    color: var(--grey-400);
}

/* ===== PRODUCT GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-med);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--grey-200);
}

.product-image {
    width: 100%;
    height: 220px;
    background: var(--grey-50);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-power);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Shine effect */
.product-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
}

.product-card:hover .product-image::after {
    animation: shineEffect 0.6s ease forwards;
}

@keyframes shineEffect {
    to { transform: translateX(100%); }
}

.product-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-badge.sale {
    background: var(--danger);
    color: var(--white);
}

.product-badge.new {
    background: var(--blue-500);
    color: var(--white);
}

.product-quick-actions {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    z-index: 2;
    opacity: 0;
    transform: translateX(8px);
    transition: var(--transition-fast);
}

.product-card:hover .product-quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-action-btn {
    width: 34px;
    height: 34px;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-500);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.quick-action-btn:hover {
    background: var(--blue-500);
    color: var(--white);
    border-color: var(--blue-500);
}

.quick-action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-info {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.product-category-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blue-500);
    font-weight: 600;
    margin-bottom: 4px;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--grey-700);
    margin-bottom: var(--space-sm);
    line-height: 1.35;
}

.product-name a {
    transition: var(--transition-fast);
}

.product-name a:hover {
    color: var(--blue-500);
}

.product-specs-mini {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 0.72rem;
    color: var(--grey-400);
}

.product-specs-mini span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-specs-mini svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.product-price .current {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--grey-900);
}

.product-price .old {
    font-size: 0.8rem;
    color: var(--grey-300);
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 38px;
    height: 38px;
    background: var(--grey-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-500);
    transition: var(--transition-fast);
    border: 1px solid var(--grey-100);
}

.add-to-cart-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.add-to-cart-btn:hover {
    background: var(--blue-500);
    color: var(--white);
    border-color: var(--blue-500);
    box-shadow: var(--shadow-blue);
}

.add-to-cart-btn.added {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

/* ===== TRUST ===== */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.trust-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    transition: var(--transition-med);
}

.trust-card:hover {
    border-color: var(--blue-200);
    box-shadow: var(--shadow-blue);
}

.trust-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto var(--space-md);
    background: var(--blue-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--blue-500);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trust-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--grey-700);
    margin-bottom: var(--space-sm);
}

.trust-card p {
    font-size: 0.85rem;
    color: var(--grey-400);
    line-height: 1.65;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: var(--space-xl);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }
}