/* Project overrides on top of original CoderDocs theme */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

main {
    flex: 1;
}

.section-shell {
    background: #fff;
    border: 1px solid #e7e9ed;
    border-radius: 12px;
}

.app-topbar .navbar-brand .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f4fcf6;
    border: 1px solid #e0f7e6;
    color: #28b76b;
    flex-shrink: 0;
}

.app-topbar .navbar-brand .brand-icon i {
    font-size: 16px;
    line-height: 1;
}

.app-topbar .navbar-nav .nav-link {
    gap: 0.5rem;
}

.app-topbar .navbar-nav .nav-link .nav-link-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f4fcf6;
    color: var(--bs-primary);
    flex-shrink: 0;
}

.app-topbar .navbar-nav .nav-link.bg-primary .nav-link-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.app-topbar .lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
}

.app-topbar .lang-switch .lang-switch-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f4fcf6;
    color: var(--bs-primary);
    flex-shrink: 0;
}

.app-topbar .lang-switch .lang-switch-icon i {
    font-size: 13px;
    line-height: 1;
}

.app-topbar .lang-dropdown {
    min-width: 150px;
    padding: 0.35rem;
    border: 1px solid #dfe7f3;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(37, 41, 48, 0.12);
}

.app-topbar .lang-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

.app-topbar .lang-dropdown .dropdown-item:hover {
    background: #f4fcf6;
    color: #1d8f52;
}

.app-topbar .lang-dropdown .dropdown-item.active,
.app-topbar .lang-dropdown .dropdown-item:active {
    background: var(--bs-primary);
    color: #fff;
}

.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.som-currency {
    display: inline-block;
    font-family: "Arial Black", "Segoe UI", sans-serif;
    font-weight: 900;
    line-height: 1;
    padding-bottom: 0.06em;
    border-bottom: 0.11em solid currentColor;
    transform: translateY(0.08em);
}

.cart-card {
    border: 1px solid #eceff3;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cart-img-wrap {
    width: 120px;
    min-width: 120px;
    height: 120px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
}

.cart-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-total-block {
    background: #fff8f0;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid #ffe0b2;
}

.favorite-card {
    border: 1px solid #eceff3;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    height: 100%;
}

.favorite-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.favorite-img-wrap {
    background: #f8f9fa;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-toggle-btn.active {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.card {
    background: #fff;
    margin-bottom: 30px;
    transition: .5s;
    border: 0;
    border-radius: .55rem;
    position: relative;
    width: 100%;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);
}

.card .body {
    font-size: 14px;
    color: #424242;
    padding: 20px;
    font-weight: 400;
}

.product_item:hover .cp_img {
    top: -60px;
}

.product_item:hover .cp_img img {
    box-shadow: 0 19px 38px rgba(0,0,0,0.3), 0 15px 12px rgba(0,0,0,0.22);
}

.product_item:hover .cp_img .hover {
    display: block;
}

.product_item .cp_img {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translate(-50%);
    width: 100%;
    padding: 15px;
    transition: all 0.2s ease-in-out;
}

.product_item .cp_img img {
    transition: all 0.2s ease-in-out;
    border-radius: 6px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.product_item .cp_img .no-image {
    height: 300px;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product_item .cp_img .hover {
    display: none;
    text-align: center;
    margin-top: 10px;
}

.product_item .product_details {
    padding-top: 155%;
    text-align: center;
}

.product_item .product_details h5 {
    margin-bottom: 5px;
}

.product_item .product_details h5 a {
    font-size: 13px;
    color: #444;
    text-decoration: none;
    line-height: 1.4;
}

.product_item .product_details h5 a:hover {
    color: #0d6efd;
}

.product_item .product_details .product_price {
    margin: 0;
}

.product_item .product_details .product_price li {
    display: inline-block;
    padding: 0 10px;
}

.product_item .product_details .product_price .new_price {
    font-weight: 600;
    color: #ff4136;
}

.product_item .product_details .product_price .status_badge {
    font-size: 12px;
    color: #6c757d;
}

.search-bar-wrapper {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.search-bar-wrapper .search-field {
    flex: 2;
    min-width: 200px;
}

.search-bar-wrapper .search-field label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-bar-wrapper .search-field input {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    outline: none;
    color: #444;
}

.search-bar-wrapper .search-field input:focus {
    border-color: #0d6efd;
}

.search-bar-divider {
    width: 1px;
    height: 40px;
    background: #dee2e6;
    flex-shrink: 0;
}

.search-bar-btn {
    flex-shrink: 0;
}

.category-sidebar {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 16px;
}

.category-sidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.category-sidebar .sidebar-header h6 {
    font-weight: 600;
    font-size: 15px;
    margin: 0;
}

.category-sidebar .sidebar-header .filter-icon {
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
}

.category-tree .cat-root {
    margin-bottom: 4px;
}

.category-tree .cat-root-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}

.category-tree .cat-root-label:hover {
    color: #0d6efd;
}

.category-tree .cat-root-label.active-root {
    color: #0d6efd;
    font-weight: 500;
}

.category-tree .cat-root-label .cat-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tree .cat-arrow {
    font-size: 12px;
    color: #aaa;
    transition: transform 0.2s;
    display: inline-block;
}

.category-tree .cat-root-label.open > .cat-arrow {
    transform: rotate(90deg);
}

.category-tree .cat-children {
    display: none;
    padding: 4px 0 4px 16px;
}

.category-tree .cat-children.show {
    display: block;
}

.category-tree .cat-child-row {
    margin-bottom: 2px;
}

.category-tree .cat-child-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 4px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
}

.category-tree .cat-child-label:hover {
    color: #0d6efd;
}

.category-tree .cat-child-label.active-child {
    color: #0d6efd;
    font-weight: 500;
}

.category-tree .cat-child-label .cat-child-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tree .cat-child-label input[type="radio"] {
    accent-color: #0d6efd;
    cursor: pointer;
}

.category-tree .cat-child-label.open > .cat-arrow {
    transform: rotate(90deg);
}

.category-tree .cat-grandchildren {
    display: none;
    padding: 4px 0 4px 20px;
}

.category-tree .cat-grandchildren.show {
    display: block;
}

.category-tree .cat-grandchild-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px;
    font-size: 12px;
    color: #777;
    cursor: pointer;
    user-select: none;
}

.category-tree .cat-grandchild-label:hover {
    color: #0d6efd;
}

.category-tree .cat-grandchild-label input[type="radio"] {
    accent-color: #0d6efd;
    cursor: pointer;
}

.btn-reset-filter {
    width: 100%;
    margin-top: 16px;
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
}

.btn-reset-filter:hover {
    background: #24a763;
}

.catalog-cover {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    width: 100%;
}

.catalog-cover:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}

.detail-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 32px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #6c757d;
    font-size: 14px;
}

.info-value {
    font-weight: 500;
    color: #212529;
}

.price-block {
    background: #fff8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-label {
    color: #6c757d;
    font-size: 14px;
}

.price-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ff4136;
}

.cart-toggle-btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.recent-card {
    border-radius: 10px;
    border: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.recent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.recent-card .recent-img {
    height: 140px;
    object-fit: cover;
    width: 100%;
}

.recent-card .no-img {
    height: 140px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

