/* E-commerce Storefront Styles (shop.css) */
:root {
    --primary-color: #6C63FF;
    --primary-dark: #4B0082;
    --bg-color: #F8F9FA;
    --white: #FFFFFF;
    --text-color: #2C3E50;
    --expense-color: #E74C3C;
}

body.shop-body {
    background-color: var(--bg-color);
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    width: 100%;
    min-height: 100vh;
}

.shop-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shop-brand {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--expense-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

.shop-main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.shop-categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.shop-categories::-webkit-scrollbar {
    height: 4px;
}

.shop-categories::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.category-chip {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-chip.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.product-card:active {
    transform: scale(0.98);
}

.product-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ccc;
}

.product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.product-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.product-stock {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
}

.btn-add-cart {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    margin-top: auto;
    transition: opacity 0.2s;
}

.btn-add-cart:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
}

.cart-panel {
    width: 100%;
    max-width: 400px;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

html[dir="rtl"] .cart-panel {
    animation: slideInRTL 0.3s forwards;
}

@keyframes slideInRTL {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.cart-items {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.empty-cart-msg {
    text-align: center;
    color: #888;
    margin-top: 50px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #666;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 2px 5px;
}

.qty-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cart-item-qty {
    font-weight: bold;
    min-width: 15px;
    text-align: center;
}

.btn-remove {
    color: var(--expense-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.cart-summary {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
}

.cart-checkout-form {
    padding: 0 20px 20px 20px;
    background: #f8f9fa;
}

.cart-footer {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
}

.w-100 {
    width: 100%;
}