/* FILE: css/Badges.css (Vibe 4.6 - Cart, Desc, Responsive Fix) */

/* Gallery & General Page Structure */
.sticker-gallery { padding-top: 120px; position: relative; z-index: 1; min-height: 80vh; }
.page-header h1 { margin-bottom: 15px; }
.page-header p { margin-bottom: 0; }

/* Search Bar */
.search-bar-container { position: relative; margin-bottom: 30px; max-width: 500px; margin-left: auto; margin-right: auto; }
#BadgesearchInput { width: 100%; padding: 12px 20px 12px 45px; border-radius: 50px; border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(5px); color: var(--text-primary); font-size: 1rem; outline: none; transition: var(--transition); }
#BadgesearchInput::placeholder { color: var(--text-muted); }
#BadgesearchInput:focus { border-color: var(--neon-cyan); box-shadow: 0 0 15px rgba(0, 255, 255, 0.2); }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1rem; pointer-events: none; }

/* Category Tabs */
.category-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 50px; flex-wrap: wrap; }
.tab { padding: 8px 20px; border-radius: 50px; border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); font-family: var(--font-body); font-weight: 500; cursor: pointer; transition: var(--transition); backdrop-filter: blur(5px); font-size: 0.9rem; }
.tab:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.tab.active { background: linear-gradient(90deg, var(--neon-cyan), #00b7ff); color: var(--bg); border-color: transparent; font-weight: 600; box-shadow: var(--glow-shadow-primary); }

/* Sticker Grid & Items (NO Checkbox styles) */
/* ===== PREMIUM RESPONSIVE GRID ===== */

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 26px);
    margin-bottom: 60px;
    align-items: stretch;
}

/* Large Tablet */
@media (max-width: 1100px) {
    .sticker-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (max-width: 900px) {
    .sticker-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}


/* FILE: css/Badges.css (Replace these two rules) */

/* ===== BADGE STYLE ===== */

.sticker-item {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    cursor: pointer;

    /* Metallic rim */
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e6e6e6 40%, #c9c9c9 70%, #b0b0b0 100%);
    padding: 10px;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.35),
        inset 0 3px 6px rgba(255, 255, 255, 0.6),
        inset 0 -4px 6px rgba(0, 0, 0, 0.2);

    transition: all 0.35s ease;
}

/* Inner Badge Image */
.sticker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: white;
    transition: transform 0.35s ease;
}

/* Shine Reflection */
.sticker-item::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0.4) 0%,
        rgba(255,255,255,0.15) 40%,
        rgba(255,255,255,0) 60%
    );
    transform: rotate(25deg);
    pointer-events: none;
}
.sticker-item:hover {
    transform: translateY(-8px) scale(1.06);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.5),
        inset 0 4px 8px rgba(255, 255, 255, 0.8),
        inset 0 -6px 10px rgba(0, 0, 0, 0.25);
}

.sticker-item:hover img {
    transform: scale(1.05);
}

/* --- Keep the existing hover/selection rules, they will now work on the outer container --- */

.sticker-item:hover {
    /* These styles apply to the OUTER glassmorphism box */
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.2); /* Neon glow */
    border-color: rgba(0, 255, 255, 0.4);
}

.sticker-item:hover img {
    /* This style applies to the INNER white square */
    transform: scale(1.03); /* Slightly zoom the inner square too */
}

.sticker-item.selected {
    /* This style applies to the OUTER glassmorphism box */
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* --- Keep all other styles (.sticker-checkbox, .pagination-controls, etc.) as they are --- */.sticker-item:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 8px 25px rgba(0, 255, 255, 0.2); border-color: rgba(0, 255, 255, 0.4); }
.sticker-item:hover img { transform: scale(1.08); }
.grid-empty-message { /* Style for no search results */
    color: var(--text-muted);
    font-style: italic;
    grid-column: 1 / -1; /* Span full grid width */
    text-align: center;
    padding: 40px 0;
}


/* Pagination Controls */
.pagination-controls { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.page-link { display: inline-block; min-width: 35px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); font-family: var(--font-body); font-weight: 500; text-align: center; cursor: pointer; transition: var(--transition); backdrop-filter: blur(5px); line-height: 1; }
.page-link:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); background: rgba(0, 245, 255, 0.1); }
.page-link.active { background: linear-gradient(90deg, var(--neon-cyan), #00b7ff); color: var(--bg); border-color: transparent; font-weight: 600; box-shadow: var(--glow-shadow-primary); cursor: default; }
.page-link.disabled { opacity: 0.5; cursor: not-allowed; background: rgba(255, 255, 255, 0.02); border-color: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.page-link.disabled:hover { border-color: rgba(255, 255, 255, 0.05); color: var(--text-muted); background: rgba(255, 255, 255, 0.02); }

/* Vibe Cart Sidebar */
.vibe-cart-sidebar { position: fixed; top: 0; right: 0; width: 320px; max-width: 90%; height: 100%; background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(15px); border-left: 1px solid var(--border-color); z-index: 1050; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,0.4); transform: translateX(100%); visibility: hidden; transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s; }
.vibe-cart-sidebar.open { transform: translateX(0); visibility: visible; }
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1040; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-close-btn { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.1); border: none; border-radius: 50%; color: var(--text-primary); font-size: 1.2rem; line-height: 1; width: 30px; height: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.3s ease; }
.cart-close-btn:hover { background: rgba(255,255,255,0.2); }
.vibe-cart-sidebar h3 { font-family: var(--font-heading); font-size: 1.3rem; color: var(--text-primary); text-align: center; padding: 15px; margin: 0; margin-top: 5px; border-bottom: 1px solid var(--border-color); }
.cart-items-list { flex-grow: 1; overflow-y: auto; padding: 15px; }
.cart-item { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; background: rgba(255, 255, 255, 0.03); border-radius: 6px; padding: 8px; border: 1px solid transparent; }
.cart-item-img { width: 50px; height: 50px; object-fit: contain; background-color: rgba(0,0,0,0.2); border-radius: 4px; flex-shrink: 0; }
.cart-item-name { flex-grow: 1; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-remove { background: none; border: none; color: #ff4d4d; font-size: 1rem; cursor: pointer; padding: 5px; opacity: 0.7; transition: opacity 0.3s ease; margin-left: auto; flex-shrink: 0;}
.cart-item-remove:hover { opacity: 1; }
.cart-empty-message { color: var(--text-muted); text-align: center; margin-top: 30px; font-style: italic; display: none; } /* JS will show this */
.cart-summary { padding: 20px 15px; border-top: 1px solid var(--border-color); background: rgba(0,0,0,0.3); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 1.1rem; font-weight: 600; }
.cart-total span:last-child { color: var(--neon-cyan); font-family: var(--font-heading); }
.btn-order-cart { width: 100%; padding: 10px 20px; font-size: 0.9rem; }
.btn-order-cart i { margin-right: 8px; }

/* Lightbox Styles */
.vibe-lightbox { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.92); z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; padding: 20px; cursor: pointer; }
.vibe-lightbox.visible { opacity: 1; visibility: visible; }
.lightbox-content { background: var(--panel-dark); border-radius: var(--radius); border: 1px solid var(--border-color); box-shadow: 0 10px 40px rgba(0,0,0,0.5); display: flex; max-width: 800px; width: 90%; max-height: 85vh; overflow: hidden; cursor: default; position: relative; transform: scale(0.95); transition: transform 0.3s ease; }
.vibe-lightbox.visible .lightbox-content { transform: scale(1); }
.lightbox-close { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.3); border: none; border-radius: 50%; color: var(--text-primary); font-size: 1.5rem; line-height: 1; width: 30px; height: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background 0.3s ease; }
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-image-container { flex: 1 1 60%; display: flex; align-items: center; justify-content: center; background-color: rgba(0,0,0,0.2); padding: 20px; }
#lightboxImage { max-width: 100%; max-height: 75vh; height: auto; display: block; object-fit: contain; border-radius: 4px; user-select: none; pointer-events: none; -webkit-user-drag: none; }
.lightbox-details { flex: 1 1 40%; padding: 30px; display: flex; flex-direction: column; overflow-y: auto; }
#lightboxTitle { font-size: 1.6rem; color: var(--text-primary); margin-bottom: 15px; line-height: 1.3; }
#lightboxDescription { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 20px; flex-grow: 1; display: block; visibility: visible; opacity: 1; min-height: 2em; }
#lightboxPrice { font-size: 1.8rem; font-weight: 700; color: var(--neon-cyan); margin-bottom: 20px; text-shadow: 0 0 10px var(--neon-cyan); }
.btn-add-cart { /* Style for the "Add to Cart" button in lightbox */
    width: 100%; text-align: center; padding: 10px 20px; font-size: 0.9rem;
    margin-top: 15px; /* Use global .btn.btn-secondary styles */
}
.btn-add-cart i { margin-right: 8px; }
.btn-add-cart.added { /* Style for when item is already in cart */
    background: #1EAD54; /* Green */
    color: white; border-color: #1EAD54;
    cursor: default; pointer-events: none;
    transform: none; box-shadow: none;
}
.btn-add-cart.added::before { display: none; } /* Hide shine effect */


/* Responsive */

/* Tablet */
@media (max-width: 992px) {
    .sticker-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Very Small Phones */
@media (max-width: 380px) {
    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .lightbox-content { flex-direction: column; width: 95%; max-height: 90vh; } .lightbox-image-container { max-height: 50vh; padding: 15px; } .lightbox-details { padding: 20px; flex-grow: 1; } #lightboxTitle { font-size: 1.4rem; } #lightboxDescription { font-size: 0.9rem; margin-bottom: 15px; } #lightboxPrice { font-size: 1.6rem; margin-bottom: 15px; }
    .vibe-cart-sidebar { width: 280px; }
    .search-bar-container { max-width: 90%; }
}
/* ===== MOBILE OPTIMIZED BADGES ===== */

@media (max-width: 600px) {

    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .sticker-item {
        transform: none;
    }

    /* Reduce neon thickness */
    .sticker-item::before {
        inset: -4px;
        filter: blur(6px);
    }

    /* Reduce metallic rim depth */
    .sticker-item::after {
        inset: 4px;
    }

    /* Reduce image padding */
    .sticker-item img {
        padding: 10px;
    }
}
@media (max-width: 380px) {

    .sticker-grid {
        gap: 12px;
    }

    .sticker-item::before {
        inset: -3px;
        filter: blur(5px);
    }

    .sticker-item img {
        padding: 8px;
    }
}
