@charset "UTF-8";
:root {
    --amazon-dark: #131921; --amazon-dark-sec: #232F3E; --amazon-orange: #FF9900;
    --amazon-orange-hover: #F08804; --amazon-link: #007185; --amazon-bg: #E3E6E6;
    --amazon-card: #FFFFFF; --amazon-text: #0F1111; --shadow: 0 2px 5px rgba(0,0,0,0.1);
    --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--amazon-bg); color: var(--amazon-text); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--amazon-link); text-decoration: none; transition: 0.2s; }
a:hover { color: #C45500; text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.site-wrapper { flex: 1; display: flex; flex-direction: column; }
.main-content { padding: 2rem 0; flex: 1; }
.main-header { background: var(--amazon-dark); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.navbar { padding: 0.8rem 0; }
.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logo { font-size: 1.5rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 0.4rem; text-decoration: none !important; }
.logo .highlight { color: var(--amazon-orange); }
.search-box { display: flex; flex: 1; max-width: 500px; }
.search-box input { flex: 1; padding: 0.7rem 1rem; border: none; border-radius: 4px 0 0 4px; font-size: 0.95rem; }
.search-box button { background: var(--amazon-orange); color: #000; padding: 0 1.2rem; border-radius: 0 4px 4px 0; font-weight: 600; }
.search-box button:hover { background: var(--amazon-orange-hover); }
.nav-actions { display: flex; gap: 0.8rem; align-items: center; }
.nav-btn { color: #fff; padding: 0.5rem 0.8rem; border-radius: 4px; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }
.nav-btn:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }

/* ✅ Avatar in Header */
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--amazon-orange); margin-right: 6px; }
.nav-profile { display: flex; align-items: center; gap: 0.4rem; }

.cart-btn { position: relative; }
.cart-count { position: absolute; top: -4px; right: -6px; background: var(--amazon-orange); color: #000; font-size: 0.7rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.hero { background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%); padding: 3rem 0; margin-bottom: 2rem; text-align: center; }
.hero h1 { font-size: 2.2rem; margin-bottom: 1rem; color: var(--amazon-dark); }
.hero p { color: #555; margin-bottom: 1.5rem; font-size: 1.1rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.5rem; border-radius: var(--radius); font-weight: 600; transition: 0.2s; border: 1px solid transparent; text-decoration: none !important; cursor: pointer; }
.btn-primary { background: var(--amazon-orange); color: #000; border-color: #D5D9D9; }
.btn-primary:hover { background: var(--amazon-orange-hover); transform: translateY(-1px); }
.btn-outline { border-color: var(--amazon-dark); color: var(--amazon-dark); background: #fff; }
.btn-outline:hover { background: var(--amazon-dark); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 70vh; padding: 1rem; }
.auth-card { background: #fff; padding: 2.5rem; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); width: 100%; max-width: 420px; border: 1px solid #ddd; }
.auth-card-wide { max-width: 550px; }
.auth-card h2 { text-align: center; margin-bottom: 1.5rem; color: var(--amazon-dark); font-size: 1.8rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.9rem; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"] { width: 100%; padding: 0.7rem; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; transition: border-color 0.2s; }
.form-group input:focus { border-color: var(--amazon-orange); outline: none; box-shadow: 0 0 0 3px rgba(255,153,0,0.2); }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: #555; }
.auth-footer a { color: var(--amazon-link); font-weight: 600; }
.section { padding: 2rem 0; }
.section-title { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--amazon-dark); border-bottom: 2px solid var(--amazon-orange); display: inline-block; padding-bottom: 0.3rem; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: 0.2s; border: 1px solid #eee; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,0.15); }
.product-image { height: 200px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 1rem; position: relative; }
.product-image img { max-height: 100%; width: auto; object-fit: contain; }
.product-info { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product-title { font-weight: 500; font-size: 0.95rem; margin-bottom: 0.5rem; line-height: 1.3; color: var(--amazon-link); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { margin-top: auto; display: flex; align-items: baseline; gap: 0.5rem; }
.current-price { font-size: 1.2rem; font-weight: 700; color: #B12704; }
.add-to-cart-btn { width: 100%; background: #FFD814; border: 1px solid #FCD200; padding: 0.6rem; border-radius: 20px; font-weight: 600; margin-top: 0.5rem; cursor: pointer; transition: background 0.2s; }
.add-to-cart-btn:hover { background: #F7CA00; }
.main-footer { background: var(--amazon-dark-sec); color: #ccc; padding: 3rem 0 1rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.footer-col h3 { color: #fff; margin-bottom: 1rem; font-size: 1.1rem; font-weight: 600; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: #ccc; font-size: 0.9rem; }
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #37475A; padding-top: 1.5rem; text-align: center; font-size: 0.9rem; }
.alert { padding: 1rem; border-radius: 4px; margin-bottom: 1.5rem; border-left: 4px solid; }
.alert-danger { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border-color: #c3e6cb; }

/* ✅ Image Upload Styles */
.image-upload-wrapper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.image-upload-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--amazon-orange); color: #000; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.image-upload-btn:hover { background: var(--amazon-orange-hover); }
#profile_image { display: none; }
.file-name { color: #888; font-size: 0.85rem; }
.image-preview { margin-top: 12px; }
.image-preview img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--amazon-orange); }

@media (max-width: 768px) {
    .nav-container { flex-direction: column; align-items: stretch; }
    .search-box { width: 100%; max-width: 100%; order: 3; margin-top: 1rem; }
    .nav-actions { justify-content: center; }
    .hero h1 { font-size: 1.8rem; }
}

/* ✅ Admin Specific Styles */
.admin-link { background: rgba(255,153,0,0.15); color: var(--amazon-orange) !important; font-weight: 600; border: 1px solid rgba(255,153,0,0.3); }
.admin-link:hover { background: var(--amazon-orange); color: #000 !important; }
.admin-page .main-content { background: #f8f9fa; min-height: calc(100vh - 160px); }