/* General styling */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0 20px;
    background-color: #1e1e1e;
    color: #9a9b9c;
    text-align: center;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('../images/bckgrnd.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-color: rgba(30, 30, 30, 0.9);
    z-index: -1;
}

/* Header styling */
header {
    background-color: transparent;
    color: white;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Logo styling */
.logo {
    margin-left: 0;
}

.logo img {
    width: 100px;
    height: auto;
}

/* Navbar styling */
.navbar {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    margin-right: 0;
}

.navbar li {
    position: relative;
}

.navbar a {
    color: #9a9b9c;
    padding: 14px 20px;
    text-decoration: none;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.navbar a:hover {
    background-color: transparent;
    color: #ffcc00;
}

/* Dropdown styling */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #131313;
    min-width: 180px;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-content a {
    font-size: 20px;
    padding: 6px 10px;
    text-decoration: none;
    color: #9a9b9c;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #666;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Category navigation grid */
.eq-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 45px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.eq-nav-card {
    background-color: #333;
    border: none;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-width: 0;
    height: auto;
    max-width: none;
    box-sizing: border-box;
    cursor: pointer;
}

.eq-nav-card:hover {
    background-color: #555;
    transform: scale(1.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.eq-nav-card span,
.eq-nav-card button {
    color: white;
    font-size: 22px;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
}

.eq-nav-card span {
    margin-top: 0;
}

.eq-nav-card span:hover,
.eq-nav-card button:hover {
    color: #ffcc00;
}

.eq-nav-card button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.eq-nav-card button:focus {
    outline: none;
}

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Equipment cards */
.nav-card {
    background-color: rgba(34, 33, 33, 0.7);
    border: none;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.nav-card:hover {
    transform: scale(1.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.nav-card a {
    color: #9a9b9c;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    margin-top: 20px;
    width: 100%;
}

.nav-card a:hover {
    color: #ffcc00;
}

.nav-card-image-wrap {
    position: relative;
}

.nav-card img {
    width: 100%;
    max-width: 240px;
    height: 180px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    mask-image: radial-gradient(circle at center, white 70%, transparent 100%);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
}

.nav-card img:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.nav-card-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}

.nav-card-overlay-right {
    left: auto;
    right: 10px;
}

.nav-card-badge {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.2;
    backdrop-filter: blur(2px);
}

.nav-card-stock {
    margin: 0;
}

.nav-card-bottom-price {
    margin: 10px 0 0;
    color: #ffcc00;
    font-size: 14px;
    font-weight: 600;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #454645;
    position: relative;
    bottom: 0;
    font-family: 'Poppins', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* Equipment details */
.equipment-detail {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 40px 20px;
    font-family: 'Poppins', sans-serif;
}

.equipment-detail img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* About/index text */
.index-info {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 40px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
}

/* Contact and download boxes */
.contact-box,
.download-box {
    background-color: #333;
    border: 2px solid #232438;
    border-radius: 10px;
    padding: 15px 20px;
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
}

.contact-box {
    margin-bottom: 20px;
}

.contact-box a,
.download-box a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.contact-box a:hover,
.download-box a:hover {
    color: #ffcc00;
}

/* Slideshow */
.slideshow-container {
    width: 100%;
    max-width: 457px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 10px;
}

.carousel {
    display: flex;
    transition: transform 1.5s ease;
    will-change: transform;
}

.slide {
    min-width: 100%;
    transition: transform 1.5s ease;
}

.slideshow-container img {
    width: 100%;
    height: auto;
    display: block;
}

.dot-container {
    text-align: center;
    padding: 10px;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.active {
    background-color: #ffcc00;
}

/* Image grid */
.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.img-grid a {
    display: block;
    text-decoration: none;
}

.img-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Generic image centering */
img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

/* Return button styling */
.rtn-back-button-container {
    max-width: 800px;
    margin: 10px auto 0;
    padding-left: 0;
    display: flex;
    justify-content: flex-start;
}

.rtn-back-button {
    background-color: #3D4D56;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.rtn-back-button:hover {
    background-color: #555;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: #ffcc00;
}

/* General action buttons */
.rtn-add-to-basket,
.rtn-submit-button,
.slider-nav-button {
    background-color: #2C3E50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.rtn-add-to-basket {
    font-size: 12px;
}

.rtn-submit-button,
.slider-nav-button {
    font-size: 16px;
    margin-top: 20px;
}

.rtn-add-to-basket:hover,
.rtn-submit-button:hover,
.slider-nav-button:hover {
    background-color: #ffcc00;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Quantity and remove buttons */
.increase,
.decrease {
    background-color: #555;
    color: white;
    border: none;
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.increase:hover,
.decrease:hover {
    background-color: #ffcc00;
    color: #333;
}

.remove {
    background-color: #555;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.remove:hover {
    background-color: #ffcc00;
    transform: scale(1.1);
}

.remove img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.remove:hover img {
    transform: rotate(-15deg);
}

/* Basket icon */
.basket-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.basket-icon {
    width: 24px;
    height: 24px;
    margin-left: 20px;
}

#basket-icon-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ffcc00;
    color: #333;
    border-radius: 50%;
    padding: 4px;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
}

/* Basket layout */
.basket-items-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#basket-items {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
}

#basket-items li {
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.basket-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.item-name {
    flex-grow: 1;
    text-align: left;
    font-size: 16px;
    color: white;
    padding-right: 20px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.quantity-input {
    width: 40px;
    height: 30px;
    text-align: center;
    margin: 0 5px;
    font-size: 20px;
}

#basket-total {
    font-size: 20px;
    color: #ffcc00;
}

.basket-buttons-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.rtn-empty-button {
    background-color: #521616;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rtn-empty-button:hover {
    background-color: #8a0b0b;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.rtn-empty-button img {
    margin-left: 10px;
}

/* Remove default arrows in number input */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Forms */
form {
    max-width: 600px;
    margin: 0 auto;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* Search */
#global-search-field,
#search-field {
    width: 100%;
    max-width: 200px;
    margin: 30px auto;
    padding: 15px 20px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    border: 2px solid #333;
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#global-search-field::placeholder,
#search-field::placeholder {
    color: #bbb;
    font-style: italic;
}

#global-search-field:focus,
#search-field:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

#dropdown-results {
    position: absolute;
    background-color: #222;
    border: 1px solid #444;
    color: white;
    max-height: 200px;
    overflow-y: auto;
    width: 400px;
    z-index: 1000;
    display: none;
    border-radius: 10px;
    left: 50%;
    transform: translateX(-50%);
    scrollbar-width: thin;
    scrollbar-color: #ffcc00 #333;
}

#dropdown-results .dropdown-item {
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

#dropdown-results .dropdown-item:hover {
    background-color: #333;
    color: #ffcc00;
}

#dropdown-results::-webkit-scrollbar {
    width: 40px;
}

#dropdown-results::-webkit-scrollbar-track {
    background: #333;
    border-radius: 10px;
}

#dropdown-results::-webkit-scrollbar-thumb {
    background-color: #ffcc00;
    border-radius: 10px;
    border: 2px solid #333;
}

#dropdown-results::-webkit-scrollbar-thumb:hover {
    background-color: #e6b800;
}

/* Basket button icon */
.basket-button {
    background-color: #ffcc00;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
}

.basket-button:hover {
    background-color: #e6b800;
    transform: scale(1.1);
}

.basket-button img.basket-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0;
    padding: 0;
}

.basket-button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

/* Image slider */
.image-slider {
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
}

.image-slider-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    .navbar {
        flex-direction: column;
        align-items: center;
    }

    .navbar li {
        margin-bottom: 10px;
    }

    .content-grid,
    .eq-content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 20px 10px;
    }

    .nav-card,
    .eq-nav-card {
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 12px;
        box-sizing: border-box;
    }

    .nav-card h2,
    .eq-nav-card h2,
    .eq-nav-card span,
    .eq-nav-card button {
        font-size: 14px;
    }

    .nav-card a {
        font-size: 13px;
        margin-top: 10px;
        word-break: break-word;
    }

    .rtn-add-to-basket {
        width: 100%;
        font-size: 11px;
        padding: 8px;
    }
}

@media (max-width: 400px) {
    .content-grid,
    .eq-content-grid {
        grid-template-columns: 1fr;
    }
}

#search-bar-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
}

#global-search-field {
    width: 100%;
    max-width: 220px;
    margin: 0;
    padding: 12px 18px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    border: 2px solid #333;
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

#global-search-field::placeholder {
    color: #bbb;
    font-style: italic;
}

#global-search-field:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

#dropdown-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #222;
    border: 1px solid #444;
    color: white;
    max-height: 240px;
    overflow-y: auto;
    width: 320px;
    z-index: 1000;
    display: none;
    border-radius: 10px;
}

.admin-search-wrap {
    margin-bottom: 14px;
}

.admin-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #101010;
    color: #fff;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.admin-search-input:focus {
    outline: none;
    border-color: #666;
}

.admin-list-item[draggable="true"] {
    cursor: grab;
}

.admin-list-item.dragging {
    opacity: 0.45;
}

.admin-drop-target {
    outline: 1px dashed #ffcc00;
}