:root {
    --primary: #e84393;
    --primary-dark: #d63031;
    --secondary: #2d3436;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --whatsapp: #25d366;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

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

/* Header */
.header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.insta { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.fb { background-color: #1877f2; }
.tiktok { background-color: #000000; }
.wa { background-color: var(--whatsapp); }

/* Main Area */
.main-content {
    padding: 40px 20px;
    min-height: 60vh;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .logo {
        font-size: 1.5rem;
    }
    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
}

/* Product Card */
.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

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

.product-image-wrap {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #f5f5f5;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}
.btn-primary:hover { background-color: var(--primary-dark); }

.btn-whatsapp {
    background-color: var(--whatsapp);
    color: #fff;
    font-size: 1.1rem;
}
.btn-whatsapp:hover {
    background-color: #1ebd5a;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: #d0d0d0;
}
.btn-danger {
    background-color: #ff4757;
    color: white;
}
.btn-danger:hover {
    background-color: #ff3344;
}
.btn-warning {
    background-color: #ffa502;
    color: white;
}
.btn-warning:hover {
    background-color: #e59400;
}

/* Footer */
.footer {
    background-color: var(--bg-color);
    padding: 40px 0;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    margin-top: 50px;
}

.footer-msg {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.footer .social-links.large {
    justify-content: center;
    gap: 20px;
}

.footer .social-icon {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
}

/* Admin Styles */
.admin-body {
    background-color: #f4f6f8;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 30px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary);
}

.card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.input-group {
    margin-bottom: 15px;
    text-align: right;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 67, 147, 0.1);
}

.error-msg {
    color: red;
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
}

.admin-actions {
    display: flex;
    gap: 15px;
}

.admin-card {
    padding: 25px;
    margin-bottom: 30px;
}

.admin-card h2 {
    margin-bottom: 20px;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

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

.admin-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.action-btns {
    display: flex;
    gap: 10px;
}
.btn-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}
