﻿* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial;
    background-color: #f5f7fb;
}

.main-layout {
    min-height: 100vh;
}

.store-header {
    height: 80px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 30px;
    padding-right: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.store-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.store-title {
    font-size: 30px;
    font-weight: bold;
    color: #34c3eb;
}

.whatsapp-button {
    background: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
}

.main-content {
    padding: 30px;
}

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

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    transition: 0.2s;
}

    .product-card:hover {
        transform: translateY(-4px);
    }

.product-image-container {
    position: relative;
    height: 320px;
    background: #f3f3f3;
}

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

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff2e63;
    color: white;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
}

.product-content {
    padding: 20px;
}

.product-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 8px;
}

.product-serial {
    color: gray;
    margin-bottom: 15px;
}

.product-price-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.old-price {
    text-decoration: line-through;
    color: gray;
}

.final-price {
    color: #34c3eb;
    font-size: 26px;
    font-weight: bold;
}

.view-product-button {
    width: 100%;
    border: none;
    background: linear-gradient(90deg,#34c3eb,#9b59ff);
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.home-title {
    margin-bottom: 30px;
    font-size: 40px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.product-modal {
    width: 1000px;
    max-width: 95%;
    background: white;
    border-radius: 25px;
    padding: 30px;
    position: relative;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 20px;
    border: none;
    background: red;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.modal-product-image {
    width: 100%;
    border-radius: 20px;
    height: 500px;
    object-fit: cover;
}

.modal-serial {
    color: gray;
    margin-bottom: 15px;
}

.modal-price {
    font-size: 35px;
    font-weight: bold;
    color: #34c3eb;
    margin-bottom: 30px;
}

.sizes-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.sizes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.size-button {
    border: 2px solid #34c3eb;
    background: white;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
}

.selected-size {
    background: #34c3eb;
    color: white;
}

.available-quantity {
    margin-bottom: 20px;
    font-weight: bold;
}

.quantity-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.quantity-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #34c3eb;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.quantity-value {
    font-size: 22px;
    font-weight: bold;
}

.modal-total {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.cancel-button,
.add-to-cart-button {
    flex: 1;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.cancel-button {
    background: #ddd;
}

.add-to-cart-button {
    background: linear-gradient(90deg,#34c3eb,#9b59ff);
    color: white;
}

.cart-button {
    background: #9b59ff;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: bold;
}

.cart-page-title {
    font-size: 40px;
    margin-bottom: 30px;
}

.empty-cart {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
}

.cart-item-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
}

.cart-item-content {
    flex: 1;
}

.cart-item-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.cart-item-serial,
.cart-item-size {
    color: gray;
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 24px;
    font-weight: bold;
    color: #34c3eb;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.cart-quantity-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-total-price {
    font-size: 24px;
    font-weight: bold;
}

.remove-item-button {
    border: none;
    background: red;
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
}

.cart-summary {
    margin-top: 40px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary-total {
    font-size: 36px;
    font-weight: bold;
}

.checkout-button {
    border: none;
    background: linear-gradient(90deg,#34c3eb,#9b59ff);
    color: white;
    padding: 18px 40px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.continue-shopping-button {
    border: none;
    background: #ddd;
    color: #222;
    padding: 18px 40px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.checkout-modal {
    width: 560px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 25px;
    padding: 24px;
}

.checkout-modal h2 {
    margin-top: 0;
}

.checkout-modal::-webkit-scrollbar {
    width: 8px;
}

.checkout-modal::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

    .form-group label {
        font-weight: bold;
        margin-bottom: 8px;
    }

    .form-group input {
        padding: 14px;
        border: 1px solid #ddd;
        border-radius: 12px;
        font-size: 16px;
    }

.checkout-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.checkout-error {
    background: #ffe5e5;
    color: #b00020;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: bold;
}

.delivery-note-box {
    background: #f5f7fb;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.confirmation-check {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    font-weight: bold;
}

.confirmation-check input {
    width: 18px;
    height: 18px;
}

.delivery-price-note {
    font-size: 16px;
    color: #777;
    margin-top: 8px;
    font-weight: normal;
}

.success-modal {
    width: 480px;
    max-width: 95%;
    background: white;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
}

.success-modal h2 {
    color: #34c3eb;
    margin-top: 0;
}

.success-modal p {
    font-size: 18px;
    line-height: 1.8;
}

.success-message-ar {
    direction: rtl;
    text-align: center;
    unicode-bidi: plaintext;
}

.admin-page-title {
    font-size: 40px;
    margin-bottom: 30px;
}

.admin-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 20px;
}

.admin-order-card {
    background: white;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    cursor: pointer;
    line-height: 1.8;
}

.admin-order-number {
    font-size: 22px;
    font-weight: bold;
    color: #34c3eb;
}

.admin-order-status {
    font-weight: bold;
    color: #9b59ff;
}

.admin-order-modal {
    width: 850px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 25px;
    padding: 30px;
    position: relative;
}

.admin-section {
    margin-bottom: 25px;
}

.admin-order-item {
    display: flex;
    gap: 15px;
    background: #f5f7fb;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 15px;
}

.admin-order-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
}

.admin-status-select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.admin-order-dates {
    color: #777;
    font-size: 14px;
}

.admin-login-page {
    min-height: calc(100vh - 140px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-login-card {
    width: 420px;
    max-width: 95%;
    background: white;
    padding: 35px;
    border-radius: 25px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
}

.admin-login-card h1 {
    margin-top: 0;
    margin-bottom: 25px;
}

.logout-button {
    border: none;
    background: #222;
    color: white;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 25px;
}

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

.order-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    cursor: pointer;
    line-height: 1.8;
}

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

    .order-header h4 {
        margin: 0;
        color: #34c3eb;
    }

.status-badge {
    background: #f0e7ff;
    color: #6f35d5;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 14px;
}

.order-modal {
    width: 850px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 25px;
    padding: 30px;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    border: none;
    background: red;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.product-row {
    display: flex;
    gap: 15px;
    background: #f5f7fb;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 15px;
}

.admin-order-product-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.size-admin-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.size-admin-row input {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.admin-add-product-button {
    margin-bottom: 35px;
    display: inline-block;
}

.admin-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #ffffff;
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.admin-nav-link {
    text-decoration: none;
    background: #20a7d8;
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.2s;
}

    .admin-nav-link:hover {
        background: #168bb5;
        transform: translateY(-1px);
    }

.admin-nav-home {
    background: #222;
}

.admin-nav-home:hover {
    background: #000;
}

.admin-top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin: 18px 0 28px 0;
    flex-wrap: wrap;
}

.admin-action-btn {
    text-decoration: none;
    color: white;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.admin-products {
    background: #6c2ff2;
}

.admin-orders {
    background: #20a7d8;
}

.admin-store {
    background: #16b957;
}

.admin-action-btn:hover {
    opacity: 0.9;
    color: white;
}