/* Shop Page Styles */

/* Main shop section */
.tracks-section {
    background-color: #1a1a1a;
    min-height: 100vh;
    padding: 105px 0 60px;
    color: #fff;
}

.tracks-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tracks-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 0;
}

.track-item {
    display: flex;
    flex-direction: column;
    flex: 0 0 calc(20% - 16px);
    /* 5 треков в ряду на десктопе */
    background-color: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.track-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.track-cover {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    /* This creates a square aspect ratio */
    overflow: hidden;
}

.track-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s ease;
}

.track-item:hover .track-cover img {
    transform: scale(1.05);
}

.track-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.track-item:hover .track-overlay {
    opacity: 1;
}


.track-cover.is-playing .track-overlay {
    opacity: 1;
}

.track-cover.is-playing .play-btn {
    display: flex;
}

.play-btn {
    background: rgba(191, 166, 122);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: #bfa67a;
    transform: scale(1.1);
}

.track-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 8px 15px 15px;
}

.track-tags {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.track-tag {
    background: rgba(191, 166, 122, 0.1);
    border: 1px solid rgba(191, 166, 122, 0.4);
    color: #bfa67a;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.track-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
}

.track-genre {
    font-size: 12px;
    color: #848484;
    line-height: 1.5;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-footer {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-top: auto;
}

.track-price {
    display: flex;
    align-items: center;
    flex: 1;
}

.price {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.price-old {
    font-size: 13px;
    color: #ff5f7b;
    font-weight: 500;
    margin-left: 6px;
    text-decoration: line-through;
    width: 100%;
}

.buy-btn {
    background: transparent;
    border: 2px solid #bfa67a;
    color: #bfa67a;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background: #bfa67a;
    color: #1a1a1a;
}

.is-sold {
    cursor: default;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Гасим hover-эффекты у проданных карточек */
.track-item.is-sold:hover { transform: none; box-shadow: none; }
.track-item.is-sold .track-cover img { transform: none; }
.track-item.is-sold .track-overlay { opacity: 0; }

.is-sold .track-cover {
    position: relative;
}

.is-sold .track-cover::after {
    content: 'SOLD';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    color: #e55757;
    padding: 0 16px;
    border: 2px solid #e55757;
    border-radius: 5px;
    font-size: 36px;
    font-weight: bold;
    line-height: 52px;
    z-index: 10;
}

.is-sold .track-cover img {
    filter: grayscale(100%);
    opacity: 0.25;
}

.is-sold .track-tag {
    background: rgba(50, 50, 50, 1);
    border: 1px solid rgba(80, 80, 80, 1);
}

.is-sold .buy-btn {
    opacity: 0;
    pointer-events: none;
}

.is-sold .track-tag,
.is-sold .track-name,
.is-sold .track-genre,
.is-sold .price,
.is-sold .price-old {
    color: #848484 !important;
}

/* No tracks message */
.tracks-grid .no-tracks {
    margin: 0 auto;
    max-width: 700px;
}

.no-tracks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background-color: #2a2a2a;
    border-radius: 12px;
    width: 100%;
}

.no-tracks h3 {
    font-size: 24px;
    color: #fff;
    margin: 0 0 15px;
    letter-spacing: 1px;
}

.no-tracks p {
    font-size: 16px;
    color: #a0a0a0;
    margin: 0;
    font-weight: 300;
}

/* Contact Form Styles */
.contact {
    background-color: #1a1a1a;
    padding: 105px 0 60px;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-row {
    display: flex;
    gap: 16px;
    margin: 0;
}

.contact-name,
.contact-email,
.contact-subject {
    flex: 1;
    padding: 0;
}

.contact-item {
    position: relative;
    padding-left: 70px;
    padding-top: 5px;
    margin-top: 30px;
}

.contact-item:first-of-type {
    margin-top: 38px;
}

.contact-item h6 {
    font-size: 12px;
    margin-top: 5px;
    margin-bottom: 7px;
}

.contact-item p,
.contact-item span,
.contact-item a {
    font-size: 16px;
}

.contact-item a {
    color: #bfa67a;
}

.contact-item a:hover {
    color: #00aeef;
}

.contact-icon {
    width: 50px;
    height: 50px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    border: 2px solid #bfa67a;
    text-align: center;
    position: absolute;
    left: 0;
    align-content: center;
}

.contact-icon i {
    font-size: 18px;
    color: #bfa67a;
}

.agree-terms {
    display: flex;
    align-items: center;
}

input[type='checkbox']:checked::after {
    color: #eee;
}

/* Form Elements */
input[type='text'],
input[type='password'],
input[type='email'],
input[type='url'],
input[type='tel'],
input[type='number'],
input[type='date'],
input[type='search'],
select,
textarea {
    height: 47px;
    line-height: 47px;
    border: 2px solid #d1d1d1;
    background-color: #2a2a2a;
    width: 100%;
    padding: 0 16px;
    color: #e3e3e3;
    transition: border-color 0.3s ease-in-out;
}

textarea#comment {
    height: 190px;
    padding: 16px;
    line-height: 1.5;
    resize: vertical;
}

input[type='text']:focus,
input[type='password']:focus,
input[type='date']:focus,
input[type='datetime']:focus,
input[type='datetime-local']:focus,
input[type='month']:focus,
input[type='week']:focus,
input[type='email']:focus,
input[type='number']:focus,
input[type='search']:focus,
input[type='tel']:focus,
input[type='time']:focus,
input[type='url']:focus,
textarea:focus {
    border-color: #bfa67a;
    outline: none;
    box-shadow: none;
}

textarea {
    height: auto;
    padding: 16px;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #e3e3e3;
}

input:-moz-placeholder,
textarea:-moz-placeholder {
    color: #e3e3e3;
    opacity: 1;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #e3e3e3;
    opacity: 1;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #e3e3e3;
}

select {
    line-height: 1;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

select::-ms-expand {
    display: none;
}

.select {
    position: relative;
    cursor: pointer;
}

.select i {
    position: absolute;
    top: 14px;
    right: 18px;
    pointer-events: none;
    font-size: 18px;
}

input[type='checkbox']:checked+label:before {
    color: #eee;
}

/* Сообщение contact формы */
.form-actions-row {
    display: flex;
    gap: 16px;
}

#msg {
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.02em;
    padding: 13px 34px;
    color: #fff;
    font-size: 14px;
    border: 3px solid transparent;
    line-height: 1.3333333;
}

#msg.success {
    background-color: #4caf50;
}

#msg.error {
    background-color: #f44336;
}

.cf-turnstile>div {
    display: flex;
}

/* Responsive Interface */
@media (max-width: 1199px) {
    .track-price {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
    
    .price-old {
        margin: 0;
    }
}

@media (max-width: 991px) {
    .tracks-section {
        padding: 75px 0 40px;
    }
    
    .contact-item {
        border-right: none;
        margin-bottom: 50px;
    }
    
    /* 4 трека в ряду на планшетах */
    .track-item {
        flex: 0 0 calc(25% - 15px);
    }
}

@media (max-width: 767px) {
    /* Contact form adjustments */
    .contact-row {
        flex-direction: column;
    }
    
    .form-actions-row {
        flex-direction: column;
    }
    
    .shop-header {
        margin-bottom: 40px;
    }

    .tracks-title {
        font-size: 20px;
    }

    .tracks-grid {
        gap: 15px;
    }

    /* 3 трека в ряду на маленьких планшетах */
    .track-item {
        flex: 0 0 calc(33.333% - 10px);
    }

    .track-info {
        padding: 6px 12px 12px;
    }

    .track-name {
        font-size: 12px;
    }

    .track-genre {
        font-size: 11px;
    }
    
    .form-actions-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tracks-grid {
        gap: 10px;
    }

    /* 2 трека в ряду на мобильных */
    .track-item {
        flex: 0 0 calc(50% - 5px);
    }

    .track-info {
        padding: 6px 10px 10px;
    }

    .play-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
