* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #0a0a0a;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px; /* Reduced padding for smaller screens */
}

/* Header */
header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(255, 215, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem; /* Slightly smaller for better fit */
    font-weight: bold;
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ffd700;
}

.cart-icon {
    position: relative;
    background: #ffd700;
    color: #000;
    padding: 8px 12px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s;
}

.cart-icon:hover {
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hamburger Menu for Mobile */
.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* Store Header */
.store-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    padding: 100px 0 40px;
    text-align: center;
    color: #fff;
}

.store-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Filter Section */
.filter-section {
    background: #1a1a1a;
    padding: 15px 0;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 60px; /* Adjusted for smaller header */
    z-index: 999;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap; /* Allow filters to wrap on smaller screens */
}

.filter-select, .search-input {
    background: #2d2d2d;
    border: 1px solid #555;
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.filter-select:focus, .search-input:focus {
    outline: none;
    border-color: #ffd700;
}

.search-input {
    width: 200px; /* Slightly smaller for mobile */
}

.filter-label {
    color: #ccc;
    font-size: 0.85rem;
}

.results-count {
    color: #ffd700;
    font-weight: bold;
}

/* Beat Grid */
.beat-catalog {
    background: #0f0f0f;
    padding: 30px 0 60px;
    min-height: 60vh;
}

.beats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.beat-card {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.beat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.beat-image {
    height: 160px; /* Slightly smaller for mobile */
    position: relative;
    overflow: hidden;
}

.beat-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 50px; /* Smaller for touch */
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.play-overlay:hover {
    background: rgba(0,0,0,0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay::before {
    content: '▶';
    color: #ffd700;
    font-size: 1.2rem;
    margin-left: 3px;
}

.beat-info {
    padding: 1.2rem;
    color: #fff;
}

.beat-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: #ffd700;
    font-weight: bold;
}

.beat-producer {
    color: #ccc;
    font-size: 0.85rem;
}

.beat-tags {
    display: flex;
    gap: 0.4rem;
    margin: 0.6rem 0;
    flex-wrap: wrap;
}

.tag {
    background: #333;
    color: #ccc;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.beat-details {
    display: flex;
    justify-content: space-between;
    margin: 0.8rem 0;
    font-size: 0.85rem;
    color: #ccc;
}

.pricing-section {
    border-top: 1px solid #333;
    padding-top: 0.8rem;
}

.license-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.license-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    background: #2d2d2d;
    border-radius: 6px;
    transition: background 0.3s;
}

.license-option:hover {
    background: #3d3d3d;
}

.license-name {
    font-weight: bold;
    font-size: 0.85rem;
}

.license-desc {
    font-size: 0.75rem;
    color: #999;
}

.license-price {
    font-weight: bold;
    color: #ffd700;
}

.add-to-cart {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.75rem;
    transition: all 0.3s;
}

.add-to-cart:hover {
    background: #ffed4a;
    transform: scale(1.05);
}

/* Audio Player */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    padding: 12px;
    border-top: 2px solid #ffd700;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s;
    color: #fff;
}

.audio-player.active {
    transform: translateY(0);
}

.player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 12px;
}

.now-playing-thumb {
    width: 40px;
    height: 40px;
    background: #ffd700;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #000;
    overflow: hidden;
}

.track-info h4 {
    color: #ffd700;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.track-info p {
    color: #ccc;
    font-size: 0.8rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.play-btn {
    background: #ffd700;
    color: #000;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s;
}

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

.progress-container {
    flex: 1;
    margin: 0 15px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: #ffd700;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #ccc;
    margin-top: 2px;
}

.close-player {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

/* Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.cart-content {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    color: #fff;
}

.cart-content h2 {
    color: #ffd700;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #2d2d2d;
    border-radius: 5px;
}

.cart-item span {
    flex: 1;
}

.remove-cart {
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

.buy-now {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.75rem;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.buy-now:hover {
    background: #ffed4a;
    transform: scale(1.05);
}

.cart-total {
    margin: 15px 0;
    font-weight: bold;
    text-align: right;
}

#close-cart {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 50px 0;
    color: #ccc;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #333;
    border-top: 3px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .beats-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .store-header {
        padding: 80px 0 30px;
    }

    .store-header h1 {
        font-size: 2.2rem;
    }

    .filter-section {
        top: 60px;
    }
}

@media (max-width: 768px) {
    .store-header {
        padding: 70px 0 20px;
    }

    .store-header h1 {
        font-size: 1.8rem;
    }

    .filters {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .filter-group {
        justify-content: space-between;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .beats-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #1a1a1a;
        padding: 1rem;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .player-content {
        flex-direction: column;
        gap: 10px;
    }

    .progress-container {
        order: -1;
        margin: 0;
    }

    .beat-image {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .cart-icon {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }

    .store-header {
        padding: 60px 0 15px;
    }

    .store-header h1 {
        font-size: 1.5rem;
    }

    .store-header p {
        font-size: 0.9rem;
    }

    .filter-select, .search-input {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    .filter-label {
        font-size: 0.8rem;
    }

    .beat-card {
        border-radius: 10px;
    }

    .beat-image {
        height: 120px;
        font-size: 1.8rem;
    }

    .beat-info {
        padding: 1rem;
    }

    .beat-title {
        font-size: 1.1rem;
    }

    .beat-producer {
        font-size: 0.8rem;
    }

    .beat-details {
        font-size: 0.8rem;
    }

    .license-option {
        padding: 5px;
    }

    .license-name {
        font-size: 0.8rem;
    }

    .license-desc {
        font-size: 0.7rem;
    }

    .add-to-cart {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .now-playing-thumb {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .track-info h4 {
        font-size: 0.8rem;
    }

    .track-info p {
        font-size: 0.75rem;
    }

    .play-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1600px;
    }

    .beats-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }

    .store-header h1 {
        font-size: 3.5rem;
    }

    .beat-image {
        height: 200px;
        font-size: 2.8rem;
    }

    .beat-title {
        font-size: 1.4rem;
    }

    .beat-producer {
        font-size: 1rem;
    }
}

.buy-button {
  background: #ffd700 !important;
  color: #000 !important;
  border-radius: 18px !important;
  padding: 6px 12px !important;
  text-decoration: none !important;
  font-weight: bold !important;
  display: inline-block !important;
  transition: transform 0.3s !important;
}

.payhip-buy-button:hover {
  background: #ffed4a !important;
  transform: scale(1.05) !important;
}