/* ===========================
   RESET & GLOBAL STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Elegant and Modern */
    --primary-color: #2C3E50;
    --secondary-color: #E8C4A0;
    --accent-color: #D4A373;
    --text-dark: #1A1A1A;
    --text-light: #F5F5F5;
    --background-light: #FAF8F5;
    --background-card: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===========================
   HEADER & NAVIGATION
   =========================== */
header {
    background: var(--background-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex: 1;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

/* Catalog Dropdown */
.catalog-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--background-card);
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 0.75rem 0;
    margin-top: 1rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.catalog-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--background-light);
    color: var(--accent-color);
}

/* ===========================
   MAIN VIEWS
   =========================== */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495E 100%);
    color: var(--text-light);
    padding: 8rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--text-light);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===========================
   SECTIONS
   =========================== */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.featured-products,
.catalog-section,
.about-section,
.account-section {
    background: var(--background-light);
}

.section-container h1 {
    font-size: 2.75rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-container h2 {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

/* ===========================
   PRODUCT GRID
   =========================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.product-card {
    background: var(--background-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image span {
    font-size: 5rem;
}

.product-card h3 {
    padding: 1.25rem 1.5rem 0.5rem;
    font-size: 1.35rem;
    color: var(--primary-color);
}

.product-description {
    padding: 0 1.5rem 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.product-price {
    padding: 0.5rem 1.5rem 1.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
}

.details-button {
    display: block;
    width: calc(100% - 3rem);
    margin: 0 1.5rem 1.5rem;
    padding: 0.75rem;
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.details-button:hover {
    background: #34495E;
}

/* ===========================
   AUTH SECTION
   =========================== */
#login-view {
    background: var(--background-light);
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-card {
    background: var(--background-card);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.tab-button {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.tab-button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.tab-button.active {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 1rem;
    font-family: var(--font-body);
}

.submit-button:hover {
    background: #34495E;
    transform: translateY(-2px);
}

.submit-button:active {
    transform: translateY(0);
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
}

.message.error {
    background: #FEE;
    color: #C33;
    border: 1px solid #FCC;
}

.message.success {
    background: #EFE;
    color: #3C3;
    border: 1px solid #CFC;
}

/* ===========================
   ACCOUNT SECTION
   =========================== */
.account-card {
    background: var(--background-card);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin: 0 auto;
}

.welcome-text {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.verification-notice {
    background-color: #FFF3CD;
    border: 2px solid #FFC107;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: #856404;
}

.verification-notice p {
    margin: 0.5rem 0;
}

.verification-notice strong {
    color: #856404;
}

.account-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.account-info p {
    color: #666;
}

/* ===========================
   ABOUT SECTION
   =========================== */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-block {
    background: var(--background-card);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.about-block h2 {
    text-align: left;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-block p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.about-block a {
    color: var(--accent-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.about-block a:hover {
    color: var(--primary-color);
}

/* ===========================
   FOOTER
   =========================== */
footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 3rem 2rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.8;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

/* ===========================
   RESPONSIVE DESIGN (Mobile-First)
   =========================== */

/* Tablet and smaller */
@media (max-width: 1024px) {
    nav {
        gap: 2rem;
    }
    
    .nav-links {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .nav-links {
        gap: 1.5rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .section-container {
        padding: 3rem 1.5rem;
    }
    
    .section-container h1 {
        font-size: 2.25rem;
    }
    
    .section-container h2 {
        font-size: 1.75rem;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .dropdown-menu {
        left: 0;
        transform: translateX(0) translateY(-10px);
    }
    
    .catalog-dropdown.active .dropdown-menu {
        transform: translateX(0) translateY(0);
    }
}

/* Mobile */
@media (max-width: 480px) {
    nav {
        padding: 1rem 0.75rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-container {
        padding: 2rem 1rem;
    }
    
    .section-container h1 {
        font-size: 1.75rem;
    }
    
    .section-container h2 {
        font-size: 1.5rem;
    }
    
    .product-card {
        padding: 1.5rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .tabs {
        gap: 0.5rem;
    }
    
    .tab-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ===========================
   ADMIN PANEL STYLES
   =========================== */
.admin-section {
    background: var(--background-light);
    min-height: 80vh;
}

.admin-form-container {
    background: var(--background-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
}

.admin-form-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-form .form-group {
    display: flex;
    flex-direction: column;
}

.admin-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.admin-form input,
.admin-form textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.admin-form input:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.admin-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.submit-button,
.cancel-button {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button {
    background-color: var(--accent-color);
    color: white;
}

.submit-button:hover {
    background-color: #C08F5C;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cancel-button {
    background-color: #E0E0E0;
    color: var(--text-dark);
}

.cancel-button:hover {
    background-color: #D0D0D0;
}

.admin-products-container {
    margin-top: 3rem;
}

.admin-products-container h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.admin-products-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-product-item {
    background: var(--background-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.admin-product-item:hover {
    box-shadow: var(--shadow-md);
}

.admin-product-image {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
}

.admin-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-details {
    flex: 1;
}

.admin-product-details h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.admin-product-details .product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
}

.product-price {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.product-stock {
    color: #666;
}

.admin-product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.edit-button,
.delete-button {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.edit-button {
    background-color: #4A90E2;
    color: white;
}

.edit-button:hover {
    background-color: #357ABD;
}

.delete-button {
    background-color: #E74C3C;
    color: white;
}

.delete-button:hover {
    background-color: #C0392B;
}

.no-products,
.error-message {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

.error-message {
    color: #E74C3C;
}

/* Responsive admin panel */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-product-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .admin-product-image {
        margin: 0 auto;
    }
    
    .admin-product-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-button,
    .cancel-button {
        width: 100%;
    }
}
