/* Product Card */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--input-bg);
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.product-card:hover .product-image img { transform: scale(1.05); }

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand-accent);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.product-badge.sale { background: var(--brand-gold); }
.product-badge.out { background: #6B7280; }

.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s;
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }

.product-action-btn {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}
.product-action-btn:hover { background: var(--brand-accent); color: white; }

.product-info { padding: 16px; }
.product-category { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.product-name { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; margin-bottom: 8px; line-height: 1.3; }
.product-name a { color: var(--text-primary); }
.product-name a:hover { color: var(--brand-accent); }
.product-price { font-family: var(--font-price); display: flex; align-items: center; gap: 8px; }
.current-price { font-size: 1.3rem; font-weight: 700; color: var(--brand-accent); }
.old-price { font-size: 0.95rem; color: var(--text-muted); text-decoration: line-through; }

.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.product-rating i { color: var(--brand-gold); font-size: 0.85rem; }
.product-rating span { font-size: 0.8rem; color: var(--text-muted); }

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: var(--bg-dark);
    color: white;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.85rem;
    margin-top: 12px;
    transition: background 0.2s;
}
.add-to-cart-btn:hover { background: var(--brand-accent); }

/* Hero Banner */
.hero-slider { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 40px; }
.hero-slide { position: relative; min-height: 400px; display: flex; align-items: center; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 2; padding: 60px; max-width: 500px; }
.hero-content h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; color: white; }
.hero-content p { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 24px; }
.hero-content .btn { font-size: 1rem; }

/* Section */
.section { padding: 40px 0; }
.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--input-bg);
    margin-left: 20px;
}

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 16px 0; font-size: 0.85rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand-accent); }
.breadcrumb span { color: var(--text-primary); }
.breadcrumb .sep { color: var(--text-muted); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.pagination a { background: var(--bg-card); color: var(--text-primary); }
.pagination a:hover { background: var(--brand-accent); color: white; }
.pagination .active { background: var(--brand-accent); color: white; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.3rem; }
.modal-close { font-size: 1.5rem; color: var(--text-muted); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state i { font-size: 4rem; color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 24px; }

/* Loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--input-bg);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Page header */
.page-header {
    background: var(--bg-dark);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
}
.page-header h1 { font-size: 2rem; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.7); }

/* Shop filters */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; }
.shop-sidebar { position: sticky; top: 140px; align-self: start; }
.filter-section { margin-bottom: 24px; }
.filter-section h4 { margin-bottom: 12px; font-size: 0.95rem; }
.filter-checkbox { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: 0.9rem; }
.filter-checkbox input { width: 18px; height: 18px; accent-color: var(--brand-accent); }

@media (max-width: 768px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
}

/* Cart page */
.cart-layout { display: grid; grid-template-columns: 1fr 350px; gap: 30px; }
.cart-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.cart-item-image { width: 100px; height: 100px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-details { flex: 1; }
.cart-item-name { font-family: var(--font-display); font-weight: 500; margin-bottom: 4px; }
.cart-item-price { font-family: var(--font-price); font-weight: 700; color: var(--brand-accent); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--input-bg); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.qty-input { width: 48px; text-align: center; padding: 6px; background: var(--input-bg); border-radius: var(--radius-sm); font-weight: 600; }
.cart-summary { background: var(--bg-card); border-radius: var(--radius-md); padding: 24px; position: sticky; top: 140px; }
.cart-summary h3 { margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9rem; }
.summary-row.total { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--input-bg); padding-top: 12px; margin-top: 8px; }

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

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 30px; }
.checkout-section { background: var(--bg-card); border-radius: var(--radius-md); padding: 24px; margin-bottom: 16px; }
.checkout-section h3 { margin-bottom: 16px; }

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

/* Auth forms */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}
.auth-card h1 { text-align: center; margin-bottom: 8px; }
.auth-card .subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 32px; }

/* Account pages */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 30px; padding: 40px 0; }
.account-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    position: sticky;
    top: 140px;
    align-self: start;
}
.account-sidebar .user-info { text-align: center; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--input-bg); }
.account-sidebar .user-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--input-bg); margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.account-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.account-nav a:hover, .account-nav a.active { background: var(--input-bg); color: var(--brand-accent); }
.account-nav a i { font-size: 1.2rem; }

@media (max-width: 768px) {
    .account-layout { grid-template-columns: 1fr; }
    .account-sidebar { position: static; }
}

/* Tracking Timeline */
.tracking-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}
.tracking-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.tracking-awb { font-family: monospace; font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.tracking-awb button { font-size: 1rem; margin-left: 8px; color: var(--brand-accent); }
.tracking-info { display: flex; justify-content: center; gap: 32px; margin-top: 16px; flex-wrap: wrap; }
.tracking-info-item { text-align: center; }
.tracking-info-item label { font-size: 0.8rem; color: var(--text-muted); display: block; }
.tracking-info-item span { font-weight: 600; font-size: 0.95rem; }

.tracking-timeline {
    padding: 20px 0;
    position: relative;
}
.timeline-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--input-bg);
    border-radius: 2px;
}
.tracking-event {
    display: flex;
    gap: 20px;
    padding-bottom: 28px;
    position: relative;
}
.tracking-event:last-child { padding-bottom: 0; }

.event-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    background: var(--input-bg);
    color: var(--text-muted);
    border: 3px solid var(--bg-primary);
}
.event-dot.delivered { background: var(--brand-success); color: white; }
.event-dot.in_transit { background: #F97316; color: white; }
.event-dot.created { background: #3B82F6; color: white; }
.event-dot.out_for_delivery { background: #EAB308; color: white; }
.event-dot.delivery_failed { background: var(--brand-danger); color: white; }
.event-dot.picked_up { background: #6366F1; color: white; }

.tracking-event.active .event-dot { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(233,69,96,0.2); }

.event-body { flex: 1; padding-top: 6px; }
.event-status { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.event-description { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 4px; }
.event-location { display: flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2px; }
.event-time { color: var(--text-muted); font-size: 0.8rem; }

/* Stepper */
.order-stepper {
    display: flex;
    justify-content: space-between;
    margin: 24px 0;
    position: relative;
}
.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}
.stepper-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}
.stepper-item.completed .stepper-dot { background: var(--brand-success); color: white; }
.stepper-item.active .stepper-dot { background: var(--brand-accent); color: white; transform: scale(1.15); }
.stepper-label { font-size: 0.75rem; margin-top: 6px; color: var(--text-muted); text-align: center; max-width: 80px; }
.stepper-item.completed .stepper-label { color: var(--brand-success); }
.stepper-item.active .stepper-label { color: var(--brand-accent); font-weight: 600; }
.stepper-line {
    position: absolute;
    top: 16px;
    left: calc(50% + 20px);
    right: calc(50% - 20px);
    height: 3px;
    background: var(--input-bg);
}
.stepper-item.completed ~ .stepper-item .stepper-line,
.stepper-item.completed .stepper-line { background: var(--brand-success); }

@media (max-width: 768px) {
    .stepper-label { font-size: 0.65rem; max-width: 60px; }
}

/* Tab system */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--input-bg); }
.tab-btn {
    padding: 12px 20px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab-btn:hover { color: var(--brand-accent); }
.tab-btn.active { color: var(--brand-accent); border-bottom-color: var(--brand-accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }
