/* Auto Accessories Page Styles */

/* Hero Section */
.autoaccessories-hero {
    background: linear-gradient(rgba(0, 42, 77, 0.8), rgba(0, 42, 77, 0.8)), url(/assets/template/tc-v/upload/screen-1-bg.jpg) center/cover;
    color: var(--text-light);
    padding: 40px 0;
    text-align: center;
}

.autoaccessories-title {
    font-size: 3rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Auto Accessories Content */
.autoaccessories-content {
    padding: 40px 0;
}

.autoaccessories-layout {
    display: flex;
    gap: 40px;
}

/* Main Content */
.autoaccessories-main {
    flex: 1;
}

/* Search Form */
.autoaccessories-search {
    padding: 30px 0;
    background-color: var(--bg-light);
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    overflow: hidden;
}

.search-input {
    flex-grow: 1;
    padding: 18px 25px;
    border: none;
    font-size: 1.1rem;
    background-color: var(--text-light);
}

.search-button {
    padding: 0 30px;
    background-color: var(--brand-accent);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1.1rem;
    font-weight: 600;
}

.search-button:hover {
    background-color: #0d3d6e;
}

/* Products Table */
.products-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #8fa1b5 #e9edf2;
}

.products-table-container::-webkit-scrollbar {
    height: 8px;
}

.products-table-container::-webkit-scrollbar-track {
    background: #e9edf2;
    border-radius: 8px;
}

.products-table-container::-webkit-scrollbar-thumb {
    background: #8fa1b5;
    border-radius: 8px;
}

.products-table-container.has-horizontal-scroll::before,
.products-table-container.has-horizontal-scroll::after {
    content: '';
    position: sticky;
    top: 0;
    bottom: 0;
    width: 16px;
    pointer-events: none;
    z-index: 2;
}

.products-table-container.has-horizontal-scroll::before {
    left: 0;
    float: left;
    background: linear-gradient(to right, rgba(242, 245, 250, 0.95), rgba(242, 245, 250, 0));
}

.products-table-container.has-horizontal-scroll::after {
    right: 0;
    float: right;
    background: linear-gradient(to left, rgba(242, 245, 250, 0.95), rgba(242, 245, 250, 0));
}

.products-table-container.has-horizontal-scroll .products-table {
    min-width: 900px;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--text-light);
}

.products-table thead {
    background-color: var(--brand-medium-blue);
    color: var(--text-light);
}

.products-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    white-space: nowrap;
}

/* Table Header Content with Flexbox */
.table-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.table-header-title {
    flex-grow: 1;
    padding-right: 10px;
}

/* Sort Arrows Container */
.sort-arrows {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 5px;
}

.sort-arrow {
    display: block;
    width: 0;
    height: 0;
    margin: 0 2px;
    border: 4px solid transparent;
}

.sort-arrow.asc {
    border-bottom-color: #ccc;
    margin-bottom: 2px;
}
a.sort-arrow.desc.active {
    border-top-color: #fff;
}
a.sort-arrow.asc.active {
    border-bottom-color: #fff;
}
.sort-arrow.desc {
    border-top-color: #ccc;
    margin-top: 2px;
}

/* a.sort-arrow.active {
    border-top-color: #fff;
} */

.sort-arrow.asc:hover {
    border-bottom-color: #ccc;
}

.sort-arrow.desc:hover {
    border-top-color: #ccc;
}

.products-table td {
    padding: 15px 20px;
    /* border-bottom: 1px solid #eee; */
    color: var(--text-dark);
}

.products-table td[data-label="Действия"] {
    display: flex;
    justify-content: center;
}

.products-table tbody tr:last-child td {
    border-bottom: none;
}

.products-table td[data-label="Наличие"] {
    font-weight: 600;
}

.products-table td[data-label="Наличие"].in-stock {
    color: #28a745; /* Green color for "In stock" */
}

.products-table td[data-label="Наличие"].on-order {
    color: #6c757d; /* Gray color for "On order" */
}

.products-table td[data-label="Цена"] {
    font-weight: bold;
        align-content: center;
    color: var(--brand-accent);
}

.products-table tbody tr:hover,.products-table tbody tr:nth-child(2n) {
    background-color: var(--bg-light);
}

.add-to-cart-btn {
    padding: 8px 15px;
    background-color: var(--brand-accent);
    color: var(--text-light);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-btn:hover {
    background-color: #0d3d6e;
}

.add-to-cart-btn i {
    font-size: 1.2rem;
}

/* Truck icon styling */
.products-table td[data-label="Наименование"] .fa-truck-moving {
    margin-right: 8px;
    color: var(--brand-medium-blue);
}

/* Mobile Responsive Table */
@media (max-width: 768px) {
    .autoaccessories-hero {
        padding: 30px 0;
    }
    
    .autoaccessories-title {
        font-size: 2.2rem;
    }
    
    .autoaccessories-content {
        padding: 20px 0;
    }
    
    .search-form {
        flex-direction: column;
        border-radius: 20px;
        max-width: 90%;
    }
    
    .search-input {
        border-radius: 20px 20px 0 0;
    }
    
    .search-button {
        border-radius: 0 0 20px 20px;
        padding: 15px;
    }
    
    .products-table-container {
        box-shadow: none;
        border-radius: 0;
        margin-bottom: 20px;
    }
    
    .products-table {
        min-width: 100%;
        box-shadow: none;
    }
    
    .products-table thead {
        display: none;
    }
    
    .products-table, 
    .products-table tbody, 
    .products-table tr, 
    .products-table td {
        display: block;
        width: 100%;
    }
    
    .products-table tr {
        margin-bottom: 20px;
        border: 1px solid #eee;
        border-radius: 10px;
        padding: 15px;
        background-color: var(--text-light);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    }
    
    .products-table tr:hover {
        background-color: var(--text-light);
    }
    
    .products-table tr:nth-child(2n) {
        background-color: var(--text-light);
    }
    
    .products-table td {
        border: none;
        position: relative;
        padding: 12px 12px 12px 40%;
        text-align: right;
        border-bottom: 1px solid #eee;
        white-space: normal;
        min-height: 40px;
        box-sizing: border-box;
    }
    
    .products-table td[data-label="Действия"] {
        text-align: center;
        padding: 12px;
    }
    
    .products-table td[data-label="Наличие"] {
        font-weight: 600;
        text-align: right;
    }
    
    .products-table td[data-label="Наличие"].in-stock {
        color: #28a745; /* Green color for "In stock" */
    }
    
    .products-table td[data-label="Наличие"].on-order {
        color: #6c757d; /* Gray color for "On order" */
    }
    
    .products-table td:last-child {
        border-bottom: none;
        justify-content: right;
    }
    
    .products-table td::before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 15px;
        top: 12px;
        width: 35%;
        text-align: left;
        font-weight: 600;
        color: var(--brand-medium-blue);
        white-space: normal;
        word-break: break-word;
    }
    
    /* Truck icon styling for mobile */
    .products-table td[data-label="Наименование"] .fa-truck-moving {
        margin-right: 8px;
        color: var(--brand-medium-blue);
    }
    
    .add-to-cart-btn {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: inherit;
    }
    
    .add-to-cart-btn i {
        font-size: 1.2rem;
    }
    
    .banner-registration {
        padding: 30px 15px;
    }
    
    .banner-registration__title {
        font-size: 1.6rem;
    }
    
    .banner-registration__subtitle {
        font-size: 1rem;
    }
    
    .banner-registration__button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    /* Table Header Content with Flexbox for mobile */
    .table-header-content {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
    }
    
    .table-header-title {
        flex-grow: 1;
        padding-right: 10px;
    }
    
    /* Sort Arrows Container for mobile */
    .sort-arrows {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        margin-left: 5px;
    }
    
    .sort-arrow {
        display: block;
        width: 0;
        height: 0;
        margin: 0 2px;
        border: 4px solid transparent;
    }
}

@media (max-width: 740px) and (min-width: 601px) {
    .products-table td {
        padding: 15px 15px 15px 50%;
        min-height: 45px;
    }
    
    .products-table td::before {
        width: 45%;
        font-size: 0.9rem;
        top: 15px;
    }
    
    .products-table tr {
        padding: 15px;
    }
}

@media (max-width: 600px) and (min-width: 551px) {
    .products-table td {
        padding: 15px 15px 15px 55%;
        min-height: 50px;
    }
    
    .products-table td::before {
        width: 50%;
        font-size: 0.85rem;
        top: 15px;
    }
    
    .products-table tr {
        padding: 15px;
    }
}

@media (max-width: 550px) and (min-width: 481px) {
    .products-table td {
        padding: 15px 15px 15px 60%;
        min-height: 55px;
    }
    
    .products-table td::before {
        width: 55%;
        font-size: 0.8rem;
        top: 15px;
    }
    
    .products-table tr {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .autoaccessories-hero {
        padding: 20px 0;
    }
    
    .autoaccessories-title {
        font-size: 1.8rem;
    }
    
    .products-table {
        font-size: 0.8rem;
    }
    
    .products-table th,
    .products-table td {
        padding: 8px 10px;
    }
    
    .products-table td[data-label="Действия"] {
        text-align: center;
        padding: 10px;
    }
    
    .add-to-cart-btn {
        padding: 10px;
        font-size: 0.9rem;
        width: 36px;
        height: 36px;
    }
    
    .add-to-cart-btn i {
        font-size: 1rem;
    }
    
    .load-more-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .sort-arrow {
        border: 3px solid transparent;
    }
    
    .banner-registration {
        padding: 20px 10px;
    }
    
    .banner-registration__title {
        font-size: 1.4rem;
    }
    
    .banner-registration__subtitle {
        font-size: 0.9rem;
    }
    
    .banner-registration__button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Mobile specific table adjustments */
    .products-table tr {
        padding: 12px;
    }
    
    .products-table td {
        padding: 15px 12px 15px 55%;
        min-height: 50px;
    }
    
    .products-table td::before {
        left: 10px;
        width: 50%;
        font-size: 0.85rem;
        top: 15px;
    }
    
    .add-to-cart-btn {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .products-table td {
        padding: 15px 10px 15px 60%;
        min-height: 55px;
    }
    
    .products-table td::before {
        width: 55%;
        font-size: 0.8rem;
        top: 15px;
    }
    
    .products-table tr {
        padding: 10px;
    }
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-bottom: 30px;
}

.load-more-btn {
    padding: 12px 30px;
    background-color: var(--brand-accent);
    color: var(--text-light);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1.1rem;
    font-weight: 600;
}

.load-more-btn:hover {
    background-color: #0d3d6e;
}

/* Banner Registration */
.banner-registration {
    background: linear-gradient(rgba(0, 42, 77, 0.6), rgba(0, 42, 77, 0.9)), url('/assets/template/tc-v/upload/gde_pokupat_avtozapchati.jpeg') center/cover;
    color: var(--text-light);
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 30px;
}

.banner-registration__wrap {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.banner-registration__text-block {
    text-align: center;
}

.banner-registration__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.banner-registration__subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.banner-registration__button {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--brand-accent);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.banner-registration__button:hover {
    background-color: #0d3d6e;
    color: var(--text-light);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 15px 0;
    background-color: #fff;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--brand-accent);
    text-decoration: none;
    padding: 5px;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-gray);
    padding: 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .autoaccessories-hero {
        padding: 30px 0;
    }
    
    .autoaccessories-title {
        font-size: 2.5rem;
    }
    
    .autoaccessories-content {
        padding: 30px 0;
    }
    
    .search-form {
        max-width: 90%;
    }
    
    .banner-registration__title {
        font-size: 1.8rem;
    }
    
    .banner-registration__subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .autoaccessories-hero {
        padding: 30px 0;
    }
    
    .autoaccessories-title {
        font-size: 2.2rem;
    }
    
    .autoaccessories-content {
        padding: 20px 0;
    }
    
    .search-form {
        flex-direction: column;
        border-radius: 20px;
        max-width: 90%;
    }
    
    .search-input {
        border-radius: 20px 20px 0 0 !important;
    }
    
    .search-button {
        border-radius: 0 0 20px 20px;
        padding: 15px;
    }
    
    .products-table th,
    .products-table td {
        padding: 8px 8px 8px 35%;
        font-size: 0.9rem;
    }
    
    .banner-registration {
        padding: 30px 15px;
    }
    
    .banner-registration__title {
        font-size: 1.6rem;
    }
    
    .banner-registration__subtitle {
        font-size: 1rem;
    }
    
    .banner-registration__button {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .autoaccessories-hero {
        padding: 20px 0;
    }
    
    .autoaccessories-title {
        font-size: 1.8rem;
    }
    
    .products-table {
        font-size: 0.8rem;
    }
    
    .products-table th,
    .products-table td {
        padding: 8px 10px;
    }
    
    .products-table td[data-label="Действия"] {
        text-align: center;
        padding: 10px;
    }
    
    .add-to-cart-btn {
        padding: 10px;
        font-size: 0.9rem;
        width: 36px;
        height: 36px;
    }
    
    .add-to-cart-btn i {
        font-size: 1rem;
    }
    
    .load-more-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .sort-arrow {
        border: 3px solid transparent;
    }
    
    .banner-registration {
        padding: 20px 10px;
    }
    
    .banner-registration__title {
        font-size: 1.4rem;
    }
    
    .banner-registration__subtitle {
        font-size: 0.9rem;
    }
    
    .banner-registration__button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Mobile specific table adjustments */
    .products-table tr {
        padding: 12px;
    }
    
    .products-table td {
        padding: 8px 8px 8px 36%;
        font-size: 0.9rem;
    }
    
    .products-table td::before {
        left: 12px;
        font-size: 0.9rem;
    }
    
    .add-to-cart-btn {
        padding: 10px;
        font-size: 0.9rem;
        width: 100%;
    }
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .header__menu-full {
        display: none;
    }
    
    .burger {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}
header {
    height: auto;
}