:root {
    --primary-color: #245d7f;
    --text-dark: #343a40;
    --text-body: #495057;
    --light-bg: #f8f9fa;
    --border-light: #dee2e6;
    --navbar-height: 70px;
}

body {
    background-color: var(--light-bg);
    font-family: 'Cairo', sans-serif;
    color: var(--text-body);
}

.alt-navbar-transparent {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    min-height: var(--navbar-height);
    display: flex;
    align-items: center;
}

.alt-navbar-transparent .navbar-brand {
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.alt-navbar-transparent .nav-link {
    color: var(--text-dark) !important;
    font-weight: 600;
    margin-inline-end: 1rem;
    transition: color .2s;
    padding: .75rem .5rem;
}

.alt-navbar-transparent .nav-link:hover,
.alt-navbar-transparent .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-inline-start: 1rem;
}

.navbar-icons .nav-link {
    font-size: 1.3rem;
    padding: .5rem;
    position: relative;
}

.navbar-icons .cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #dc3545;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    border-radius: 50%;
    padding: .2em .5em;
    min-width: 20px;
    text-align: center;
    transform: translate(25%, -25%);
}

.alt-navbar-transparent .nav-link.continue-shopping-btn {
    background: var(--primary-color);
    color: #fff !important;
    padding: .75rem 1.25rem;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    margin-inline-start: 1.5rem;
}

.alt-navbar-transparent .nav-link.continue-shopping-btn:hover {
    background: #0a3147;
}

@media (max-width:991.98px) {
    .alt-navbar-transparent .nav-link.continue-shopping-btn {
        margin-inline-start: 0;
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }

    .navbar-icons {
        margin-inline-start: 0;
        padding-top: 1rem;
        width: 100%;
        justify-content: center;
        border-top: 1px solid #eee;
        padding-bottom: .5rem;
    }
}

/* Sidebar & Filters */
.filter-sidebar {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1rem;
}

.filter-sidebar h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.filter-sidebar .form-control,
.filter-sidebar .form-select {
    border-radius: .5rem;
}

.filter-sidebar .filter-group {
    margin-bottom: 1.5rem;
}

/* Products Grid */
main.container {
    padding-top: calc(var(--navbar-height) + 2rem);
}

.alt-product-card {
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.alt-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
}

.alt-product-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.alt-store-info {
    background: #fff;
    border-top: 1px solid #eee;
    padding: .5rem;
}

.alt-store-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.alt-store-name {
    font-size: .95rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.alt-btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    transition: all .3s;
    padding: .85rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: .5rem;
}

.alt-btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Modal Overrides */
.modal-content {
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 1.25rem;
}

.modal-title {
    font-size: 1.3rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body img#alt-modal-product-image {
    max-height: 250px;
    object-fit: contain;
    border: 1px solid #eee;
    width: 100%;
    margin-bottom: 1.5rem;
}

#alt-no-options-message,
#alt-modal-error-message {
    margin-top: 1rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
}

.modal-footer .btn {
    font-size: 1.05rem;
    padding: .75rem 1.25rem;
}

@media (max-width: 767.98px) {
    .modal-body .row>div {
        flex-basis: 100%;
        max-width: 100%;
    }

    .modal-body img#alt-modal-product-image {
        margin: 0 auto 1.5rem;
        display: block;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* Modal Overrides */
.modal-content {
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 1.25rem;
}

.modal-title {
    font-size: 1.3rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body img#alt-modal-product-image {
    max-height: 250px;
    object-fit: contain;
    border: 1px solid #eee;
    width: 100%;
    margin-bottom: 1.5rem;
}

#alt-no-options-message,
#alt-modal-error-message {
    margin-top: 1rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
}

.modal-footer .btn {
    font-size: 1.05rem;
    padding: .75rem 1.25rem;
}

@media (max-width: 767.98px) {
    .modal-body .row>div {
        flex-basis: 100%;
        max-width: 100%;
    }

    .modal-body img#alt-modal-product-image {
        margin: 0 auto 1.5rem;
        display: block;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* Size & Color Options Styles */
.alt-size-option,
.alt-color-option {
    border-radius: .5rem;
    padding: .85rem 1.4rem;
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-body);
    border: 1px solid var(--border-light);
    background: #fff;
    transition: all .2s;
    margin: .25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}

.alt-size-option:hover,
.alt-color-option:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.alt-size-option.selected,
.alt-color-option.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 5px rgba(165, 124, 59, .2);
}

/* ألوان دائرية مميزة */
.alt-color-option[data-color-hex] {
    width: 32px;
    height: 32px;
    padding: 0;
    overflow: hidden;
    position: relative;
    border-radius: 15%;
}

.alt-color-option[data-color-hex].selected {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary-color);
}

.alt-color-option[data-color-hex].selected::after {
    content: '✔';
    font-size: 1.3rem;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 3px rgba(0, 0, 0, .5);
}

#alt-product-sizes,
#alt-product-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}