/* public/assets/css/style.css */

/* Fonts */
@font-face {
    font-family: IRANSans;
    src: url('../fonts/IRANSans.woff2') format('woff2');
    font-weight: normal;
}
@font-face {
    font-family: IRANSans;
    src: url('../fonts/IRANSans-Bold.woff2') format('woff2');
    font-weight: bold;
}

/* Variables */
:root {
    --primary-color: #1e88e5; /* Ocean Blue */
    --secondary-color: #4caf50; /* Mint Green */
    --accent-color: #ff9800; /* Amber */
    --text-color-dark: #222;
    --text-color-light: #555;
    --bg-light: #f6f8fb;
    --bg-white: #fff;
    --border-color: #eee;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition-speed: 0.3s ease;
}

/* Base Styles */
body {
    font-family: IRANSans, Tahoma, sans-serif;
    background: var(--bg-light);
    color: var(--text-color-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    direction: rtl; /* Right-to-left for Persian */
    text-align: right; /* Align text right by default */
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.pt-4 { padding-top: 1.5rem; }

.section-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.subsection-title {
    font-size: 1.8rem;
    color: var(--text-color-dark);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-speed);
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #1565c0; /* Darker blue */
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background: #388e3c; /* Darker green */
    box-shadow: var(--shadow-medium);
}

.btn-info {
    background: #03a9f4; /* Light Blue */
    color: #fff;
}
.btn-info:hover {
    background: #0288d1;
}

.btn-warning {
    background: #ffc107; /* Amber */
    color: #fff;
}
.btn-warning:hover {
    background: #ffb300;
}

.btn-danger {
    background: #e53935; /* Red */
    color: #fff;
}
.btn-danger:hover {
    background: #c62828;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 10px;
}

.btn i {
    margin-right: 8px; /* For RTL */
    margin-left: 0;
}
.btn i.fa-chevron-left {
    margin-right: 0;
    margin-left: 8px;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color-dark);
}

.form-control, .form-control-file {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: IRANSans, Tahoma, sans-serif;
    font-size: 1rem;
    color: var(--text-color-dark);
    background-color: var(--bg-white);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus, .form-control-file:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2);
    outline: none;
}

textarea.form-control {
    resize: vertical;
}

.form-text {
    font-size: 0.85rem;
    color: var(--text-color-light);
    margin-top: 0.25rem;
    display: block;
}

/* Alerts and Messages */
.alert {
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}
.alert i {
    margin-left: 10px; /* For RTL */
    font-size: 1.2rem;
}
.error-message {
    background-color: #ffebee; /* Light Red */
    color: #d32f2f; /* Dark Red */
    border: 1px solid #ef9a9a;
}
.success-message {
    background-color: #e8f5e9; /* Light Green */
    color: #2e7d32; /* Dark Green */
    border: 1px solid #a5d6a7;
}
.warning-message {
    background-color: #fffde7; /* Light Yellow */
    color: #ff8f00; /* Dark Yellow */
    border: 1px solid #fff59d;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    color: var(--text-color-light);
    margin-top: 30px;
}
.empty-state i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 15px;
}
.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Header */
.site-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 1rem 0;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: 15px; /* Adjust for RTL */
}
.logo-img {
    height: 40px;
    margin-left: 10px;
}
.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    line-height: 1;
}
.logo .tagline {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
    padding-right: 5px;
    line-height: 1;
    white-space: nowrap;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin-right: 20px;
}

.main-nav ul li a {
    color: #fff;
    font-weight: normal;
    padding: 5px 0;
    position: relative;
    transition: var(--transition-speed);
}
.main-nav ul li a:hover {
    color: var(--accent-color);
}
.main-nav ul li a::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-speed);
}
.main-nav ul li a:hover::after {
    width: 100%;
    left: 0;
}

.main-nav ul li .btn-login-modal {
    background: #fff;
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-weight: bold;
}
.main-nav ul li .btn-login-modal:hover {
    background: #e0e0e0;
    color: var(--primary-color);
    box-shadow: none;
}
.main-nav ul li .btn-login-modal i {
    margin-right: 8px;
}

.cart-icon-wrapper {
    position: relative;
    margin-right: 0 !important; /* Override default margin */
    margin-left: 20px;
}
.cart-icon {
    font-size: 1.3rem;
}
.cart-count {
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.75rem;
    position: absolute;
    top: -8px;
    left: -10px; /* Adjust for RTL */
    min-width: 22px;
    text-align: center;
    line-height: 1.3;
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
}

/* Hero Section */
.hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: var(--shadow-light);
    flex-wrap: wrap-reverse;
}
.hero-content {
    flex: 1;
    min-width: 300px;
    padding-right: 30px;
}
.hero-content h2 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.hero-content p {
    font-size: 1.3rem;
    color: var(--text-color-light);
    margin-bottom: 30px;
}
.hero-image {
    flex: 1;
    max-width: 450px;
}

/* Cards (General) */
.card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.card h2, .card h3, .card h4 {
    color: var(--primary-color);
    margin-top: 0;
}
.card p {
    color: var(--text-color-light);
    font-size: 0.95rem;
}

/* Home Section Cards */
.home-sections {
    padding-top: 0;
}
.category-cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}
.category-cards .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.category-cards .card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.category-cards .card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.category-cards .card p {
    flex-grow: 1;
    margin-bottom: 20px;
}

/* How It Works Section */
.how-it-works {
    margin-top: 60px;
    margin-bottom: 60px;
    padding: 40px;
    background: linear-gradient(135deg, #e3f2fd, #e8f5e9);
    border-radius: 20px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.05);
}
.how-it-works .section-title {
    color: #333;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.step-item {
    text-align: center;
    background: #fff;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.step-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.step-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    background: var(--bg-light);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    border: 1px solid var(--border-color);
}
.step-item h4 {
    font-size: 1.3rem;
    color: var(--text-color-dark);
    margin-bottom: 10px;
}
.step-item p {
    color: var(--text-color-light);
    font-size: 0.9rem;
}

/* Category Page */
.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.category-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.category-image, .category-image-placeholder {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
}
.category-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    font-size: 3rem;
    color: var(--text-color-light);
}
.category-card h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.category-card .description {
    font-size: 0.9rem;
    color: var(--text-color-light);
    min-height: 40px; /* Ensure consistent height for descriptions */
    margin-bottom: 15px;
    flex-grow: 1;
}
.category-card .inactive-category-description {
    color: #e53935; /* Red for inactive message */
    font-weight: bold;
}
.category-card .btn {
    width: 80%;
    margin-top: auto; /* Push button to bottom */
}

/* Product Page */
.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}
.product-card {
    background: var(--bg-white);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.product-image, .product-image-placeholder {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}
.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    font-size: 3rem;
    color: var(--text-color-light);
}
.product-card h4 {
    font-size: 1.2rem;
    color: var(--text-color-dark);
    margin-bottom: 8px;
    flex-grow: 1; /* Allow product name to take available space */
}
.product-card .price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.product-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto; /* Push actions to bottom */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}
.product-actions .qty-input {
    width: 60px;
    padding: 8px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    margin-left: 10px; /* For RTL */
    font-size: 0.9rem;
}
.product-actions .btn-add-to-cart {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Bazar Page */
.bazar-info-card {
    background: #e3f2fd; /* Light blue background */
    border: 1px solid #bbdefb;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 1.05rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* RTL adjustment */
}
.bazar-info-card i {
    font-size: 1.5rem;
    margin-left: 10px; /* Adjust for RTL */
}
.custom-order-prompt {
    text-align: center;
    margin-top: 40px;
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}
.custom-order-prompt p {
    font-size: 1.1rem;
    color: var(--text-color-dark);
    margin-bottom: 20px;
}

/* Custom Order Page */
.form-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    max-width: 700px;
    margin: 30px auto;
}

/* Cart Page */
.cart-items-list {
    margin-top: 30px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 15px;
}
.cart-item-card {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed var(--border-color);
}
.cart-item-card:last-child {
    border-bottom: none;
}
.item-image-wrapper {
    width: 80px;
    height: 80px;
    margin-left: 15px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}
.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.item-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-color-light);
}
.item-details {
    flex-grow: 1;
    margin-left: 15px;
}
.item-details h4 {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    color: var(--text-color-dark);
}
.item-price {
    font-size: 0.95rem;
    color: var(--text-color-light);
    margin: 0;
}
.item-quantity-control {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 15px;
}
.item-quantity-control .qty-input {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 0 5px;
}
.item-quantity-control .btn {
    padding: 5px 10px;
    font-size: 0.9rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: 5px;
}
.item-quantity-control .btn:hover {
    background: #1565c0;
}
.item-total-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
    flex-shrink: 0;
    width: 100px; /* Fixed width for better alignment */
    text-align: left; /* Adjust for RTL */
    margin-left: 15px;
}
.btn-remove-item {
    background: #f44336; /* Red */
    color: #fff;
    padding: 8px 10px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.btn-remove-item:hover {
    background: #d32f2f;
}

.cart-summary {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-top: 30px;
    text-align: center;
}
.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
}
.total-amount {
    font-size: 1.5rem;
    color: var(--secondary-color);
}
.checkout-button {
    width: 100%;
}
.clear-cart-button {
    background: #9e9e9e; /* Grey */
    width: 100%;
}
.clear-cart-button:hover {
    background: #757575;
}

/* Checkout Page */
.checkout-summary-card, .checkout-form-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-top: 30px;
}
.checkout-summary-card h3, .checkout-form-card h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.summary-items-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}
.summary-items-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 0.95rem;
    color: var(--text-color-light);
}
.summary-items-list li:last-child {
    border-bottom: none;
}
.total-line {
    font-size: 1.3rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.checkout-form-card .btn-lg {
    width: 100%;
}

/* Thank You & Payment Status Pages */
.thank-you-page, .payment-status-page {
    padding-top: 60px;
    padding-bottom: 60px;
}
.icon-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px auto;
    color: #fff;
    font-size: 4rem;
}
.success-circle {
    background: var(--secondary-color);
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0.2);
}
.error-circle {
    background: #e53935;
    box-shadow: 0 0 0 10px rgba(229, 57, 53, 0.2);
}
.warning-circle {
    background: #ff9800;
    box-shadow: 0 0 0 10px rgba(255, 152, 0, 0.2);
}
.thank-you-page .lead, .payment-status-page .lead {
    font-size: 1.3rem;
    color: var(--text-color-dark);
    margin-bottom: 25px;
}
.order-id-display {
    font-size: 1.2rem;
    color: var(--text-color-light);
    margin-bottom: 30px;
}
.order-id-display strong {
    color: var(--primary-color);
}

/* Dashboard */
.dashboard-tabs {
    display: flex;
    justify-content: center;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
    overflow: hidden;
}
.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: IRANSans, Tahoma, sans-serif;
    font-size: 1.1rem;
    color: var(--text-color-light);
    border-bottom: 3px solid transparent;
    transition: var(--transition-speed);
    position: relative;
    outline: none;
}
.tab-button i {
    margin-left: 8px;
}
.tab-button:hover {
    color: var(--primary-color);
}
.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: bold;
}
.tab-content {
    display: none;
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}
.tab-content.active {
    display: block;
}

/* Dashboard Orders */
.orders-list {
    margin-top: 20px;
}
.order-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.order-header h4 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}
.order-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
}
.status-pending { background: #ff9800; } /* Amber */
.status-confirmed { background: #4caf50; } /* Green */
.status-preparing { background: #2196f3; } /* Blue */
.status-on_route { background: #ffc107; } /* Yellow */
.status-delivered { background: #009688; } /* Teal */
.status-canceled, .status-canceled_by_user { background: #f44336; } /* Red */

.order-details p {
    margin: 5px 0;
    font-size: 0.95rem;
    color: var(--text-color-light);
}
.order-details strong {
    color: var(--text-color-dark);
}
.order-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.payment-status-pending { color: #ff9800; font-weight: bold; }
.payment-status-paid { color: #4caf50; font-weight: bold; }
.payment-status-failed, .payment-status-canceled_by_user { color: #f44336; font-weight: bold; }


/* Dashboard Addresses */
.addresses-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.address-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
}
.address-card h4 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.address-card p {
    margin: 5px 0;
    color: var(--text-color-light);
}
.address-card .coords, .address-card .phone-number {
    font-size: 0.9rem;
}
.address-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Profile Form */
.profile-form {
    max-width: 600px;
    margin: 20px auto;
}
.profile-form .form-control[disabled] {
    background-color: #eceff1;
    cursor: not-allowed;
}

/* Footer */
.site-footer {
    background: #263238; /* Dark Grey */
    color: #eceff1;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 50px;
}
.site-footer p {
    margin: 0 0 10px 0;
}
.site-footer .social-links a {
    color: #eceff1;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color var(--transition-speed);
}
.site-footer .social-links a:hover {
    color: var(--primary-color);
}

/* Modals */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.3s forwards;
    -webkit-animation: fadeInModal 0.3s forwards;
}
.modal.is-visible {
    display: flex;
}

.modal-content {
    background-color: var(--bg-white);
    margin: auto;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    position: relative;
    min-width: 320px;
    max-width: 500px;
    width: 90%;
    transform: translateY(-50px);
    opacity: 0;
    animation: slideInModal 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -webkit-animation: slideInModal 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal.is-visible .modal-content {
    animation-delay: 0.1s;
}

.modal-content h2, .modal-content h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.modal-content .close-button {
    color: var(--text-color-light);
    position: absolute;
    top: 15px;
    left: 20px; /* Adjust for RTL */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-speed);
}
.modal-content .close-button:hover,
.modal-content .close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
}
.modal-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.modal-footer p {
    font-size: 0.9rem;
    color: var(--text-color-light);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
    }
    .main-nav {
        order: 3; /* Push nav to new line */
        flex-basis: 100%;
        margin-top: 15px;
    }
    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    .main-nav ul li {
        margin: 0 10px;
        margin-bottom: 10px;
    }
    .hero-banner {
        flex-direction: column-reverse;
        padding: 30px;
        text-align: center;
    }
    .hero-content {
        padding-right: 0;
        margin-top: 30px;
    }
    .hero-content h2 {
        font-size: 2.2rem;
    }
    .hero-image {
        max-width: 80%;
    }
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    .category-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .how-it-works {
        padding: 30px;
    }
    .steps-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .cart-item-card {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }
    .item-details {
        flex-basis: 100%;
        text-align: right;
        margin-left: 0;
    }
    .item-quantity-control {
        order: 3; /* Move to next line */
        margin-left: 0;
        margin-right: auto; /* Push to left in RTL */
    }
    .item-total-price {
        order: 4;
        width: auto;
        text-align: left;
        margin-left: 0;
    }
    .btn-remove-item {
        order: 5;
        margin-right: auto;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* Hide navigation by default on small screens */
        position: absolute;
        top: 70px; /* Adjust based on header height */
        right: 0;
        left: 0;
        background: var(--primary-color);
        box-shadow: var(--shadow-medium);
        padding: 15px 0;
        transition: transform 0.3s ease-out;
        transform: translateY(-100%);
        flex-direction: column;
        align-items: center;
    }
    .main-nav.active {
        display: flex;
        transform: translateY(0);
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }
    .main-nav ul li {
        width: 100%;
        text-align: center;
        margin: 0;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    .main-nav ul li a {
        display: block;
        padding: 10px 0;
        color: #fff;
    }
    .main-nav ul li a::after {
        display: none;
    }
    .mobile-menu-toggle {
        display: block; /* Show hamburger icon */
    }
    .logo {
        flex-grow: 1; /* Allow logo to take space */
    }
    .logo .tagline {
        display: none; /* Hide tagline on very small screens */
    }
    .hero-content h2 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .category-grid, .product-grid, .steps-grid, .addresses-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    .hero-banner {
        padding: 20px;
    }
    .hero-content h2 {
        font-size: 1.6rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
    .modal-content {
        padding: 20px;
    }
}