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

:root {
    --apple-black: #1d1d1f;
    --apple-gray: #86868b;
    --apple-light-gray: #f5f5f7;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --bg-white: #ffffff;
    --border-color: #d2d2d7;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    color: var(--text-primary);
    background-color: var(--bg-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
    width: 100%;
}

/* ============================================
   NAVBAR (Apple-style)
   ============================================ */
.navbar {
    background-color: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    height: 44px;
}

.logo {
    font-size: 21px;
    font-weight: 600;
    color: var(--apple-black);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.65;
}

.main-nav {
    display: flex;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    display: flex;
}

.nav-menu a {
    color: var(--apple-black);
    text-decoration: none;
    padding: 0 20px;
    font-size: 12px;
    font-weight: 400;
    transition: opacity 0.3s;
    display: block;
    line-height: 44px;
}

.nav-menu a:hover {
    opacity: 0.65;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    flex: 1;
    padding: 0;
    min-height: calc(100vh - 200px);
}

/* ============================================
   HERO SECTION (Apple-style)
   ============================================ */
.hero {
    background: linear-gradient(90deg, #e3f2fd 0%, #fff3e0 50%, #f3e5f5 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(227, 242, 253, 0.8) 0%, rgba(255, 243, 224, 0.8) 50%, rgba(243, 229, 245, 0.8) 100%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 80px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
    display: inline-block;
}

.hero-title-shop {
    color: #0071e3;
}

.hero-title-product {
    color: #d97706;
}

/* ============================================
   PRODUCTS SECTION (Apple-style)
   ============================================ */
.products-section {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 56px;
    line-height: 1.07143;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin: 0;
}

.section-title-main {
    color: #0071e3;
}

.section-title-sub {
    color: var(--apple-black);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: 18px;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #ff6b35;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    z-index: 10;
}

.product-image {
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    background-color: var(--apple-light-gray);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--apple-gray);
    text-align: center;
    padding: 20px;
}

.product-info {
    text-align: left;
    padding: 30px;
}

.product-name {
    font-size: 32px;
    line-height: 1.125;
    font-weight: 600;
    letter-spacing: -0.003em;
    color: var(--apple-black);
    margin: 0 0 12px;
}

.product-price {
    font-size: 19px;
    line-height: 1.21053;
    font-weight: 400;
    letter-spacing: 0.012em;
    color: var(--apple-black);
    margin: 0;
}

.no-products {
    text-align: center;
    color: var(--apple-gray);
    font-size: 17px;
    grid-column: 1 / -1;
    padding: 60px 20px;
}

/* ============================================
   BUTTONS (Apple-style)
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 22px;
    text-decoration: none;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 400;
    transition: all 0.3s;
    font-family: 'Poppins', -apple-system, sans-serif;
    text-align: center;
    letter-spacing: -0.022em;
    line-height: 1.17647;
}

.btn-primary {
    background-color: var(--apple-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--apple-blue-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--apple-blue);
    border: 1px solid var(--apple-blue);
}

.btn-secondary:hover {
    background-color: var(--apple-blue);
    color: white;
}

.btn-success {
    background-color: #34c759;
    color: white;
}

.btn-success:hover {
    background-color: #30d158;
}

.btn-danger {
    background-color: #ff3b30;
    color: white;
}

.btn-danger:hover {
    background-color: #ff453a;
}

.btn-warning {
    background-color: #ff9500;
    color: white;
}

.btn-warning:hover {
    background-color: #ff9f0a;
}

/* ============================================
   FOOTER (Apple-style)
   ============================================ */
.site-footer {
    background-color: var(--apple-light-gray);
    color: var(--apple-gray);
    padding: 40px 0 22px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--apple-black);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.footer-column p {
    font-size: 12px;
    line-height: 1.33337;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--apple-gray);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a {
    color: var(--apple-gray);
    text-decoration: none;
    font-size: 12px;
    line-height: 1.33337;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--apple-blue);
    text-decoration: underline;
}

.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    color: var(--apple-gray);
    font-size: 12px;
    line-height: 1.33337;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.footer-contact a {
    color: var(--apple-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-contact a:hover {
    color: var(--apple-blue);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
}

.footer-bottom p {
    color: var(--apple-gray);
    font-size: 12px;
    line-height: 1.33337;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 0;
}

/* ============================================
   FORM STYLES (for other pages)
   ============================================ */
.form-container {
    max-width: 500px;
    margin: 40px auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--apple-black);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: -0.01em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 17px;
    font-family: 'Poppins', -apple-system, sans-serif;
    transition: all 0.3s;
    background-color: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.alert {
    padding: 16px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-weight: 400;
    font-size: 14px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ============================================
   TABLE STYLES (for admin/user dashboards)
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
}

table th,
table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--apple-light-gray);
    color: var(--apple-black);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
}

table tr:hover {
    background-color: var(--apple-light-gray);
}

table tr:last-child td {
    border-bottom: none;
}

/* ============================================
   WELCOME MESSAGE (user dashboard)
   ============================================ */
.welcome-message {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 18px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-message h2 {
    color: var(--apple-black);
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.003em;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.actions a,
.actions button {
    padding: 8px 16px;
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 64px;
    }
    
    .section-title {
        font-size: 48px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .product-image {
        height: 350px;
    }
    
    .product-name {
        font-size: 28px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-content {
        padding: 0;
    }
    
    .nav-menu {
        gap: 0;
    }
    
    .nav-menu a {
        padding: 0 15px;
        font-size: 11px;
    }
    
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 48px;
        line-height: 1.1;
    }
    
    .section-title {
        font-size: 40px;
    }
    
    .products-section {
        padding: 60px 0;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-image {
        height: 300px;
    }
    
    .product-name {
        font-size: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 40px 0 30px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .products-section {
        padding: 40px 0;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .product-image {
        height: 250px;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .product-name {
        font-size: 22px;
    }
    
    .product-price {
        font-size: 17px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
}
