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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --danger: #ef4444;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --border: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow-x: hidden;
}

/* Animated Background with Floating Shapes */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(240, 147, 251, 0.08) 0%, transparent 50%);
    z-index: -1;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Floating Shapes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(2px);
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation: float 25s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation: float 20s ease-in-out infinite reverse;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.1), rgba(245, 87, 108, 0.1));
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation: float 30s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.08), rgba(102, 126, 234, 0.08));
}

.shape-4 {
    width: 250px;
    height: 250px;
    top: 30%;
    right: 30%;
    animation: float 22s ease-in-out infinite reverse;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(5deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(3deg);
    }
}

/* Content overlay to ensure readability */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(249, 250, 251, 0.95);
    z-index: 0;
    backdrop-filter: blur(100px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER ========== */
header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 50px;
    display: block;
}

nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    display: inline-block;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #f97316 50%, #f59e0b 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

nav a:hover::before {
    opacity: 1;
}

/* ========== PRODUCT PAGE ========== */
.product-section {
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.product-info {
    padding: 1rem 0;
}

.product-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.price-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 1.5rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--danger);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin: 1.5rem 0;
}

.benefits {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.benefits h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.benefits ul {
    list-style: none;
}

.benefits li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.benefits li:last-child {
    border-bottom: none;
}

.benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 1.2rem;
}

.options-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.color-options, .size-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.color-btn, .size-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.color-btn:hover, .size-btn:hover,
.color-btn.active, .size-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.btn-buy {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 2rem;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* ========== ORDER FORM ========== */
.order-section {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 3rem 0;
}

.order-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text);
}

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

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

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

.btn-submit {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    animation: pulse-button 2s ease-in-out infinite;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

/* ========== ADMIN PANEL ========== */
.admin-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 20px;
}

.admin-header {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.data-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

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

.data-table th {
    background: var(--bg);
    font-weight: 700;
    color: var(--text);
}

.data-table tr:hover {
    background: var(--bg);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-new {
    background: #dbeafe;
    color: var(--primary);
}

.badge-processing {
    background: #fef3c7;
    color: #d97706;
}

.badge-completed {
    background: #d1fae5;
    color: #059669;
}

.btn-view {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-view:hover {
    background: var(--primary-dark);
}

.btn-logout {
    padding: 0.75rem 1.5rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #dc2626;
}

/* ========== LOGIN FORM ========== */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 0 20px;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

/* ========== STICKY BUY BUTTON (MOBILE) ========== */
.sticky-buy-button {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    padding: 1rem;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sticky-buy-button .btn-buy {
    width: 100%;
    margin: 0;
    padding: 1rem;
    font-size: 1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-images {
        position: relative;
        top: 0;
        margin-bottom: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    nav ul {
        gap: 0.5rem;
    }

    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
    }

    .logo img {
        height: 52.5px;
        max-width: 210px;
    }

    .price {
        font-size: 1.75rem;
    }

    .old-price {
        font-size: 1.125rem;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .benefits {
        padding: 1.5rem;
    }

    .benefits li {
        font-size: 0.9rem;
        padding: 0.5rem 0;
        padding-left: 1.5rem;
    }

    .options-box {
        padding: 1.5rem;
    }

    /* Stack option groups vertically on mobile */
    .options-box .option-group {
        margin-bottom: 1.5rem;
    }

    .options-box .option-group:last-child {
        margin-bottom: 0;
    }

    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }

    .data-table {
        overflow-x: auto;
    }

    .order-section {
        padding: 2rem 1.5rem;
    }

    /* Reduce animations on mobile for performance */
    .shape {
        animation-duration: 40s !important;
    }

    .shape-1, .shape-3 {
        width: 200px;
        height: 200px;
    }

    .shape-2, .shape-4 {
        width: 150px;
        height: 150px;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ========== NOTIFICATION ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}
