/* FILE: css/stickers.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; }
#stickerSearchInput { 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); }
#stickerSearchInput::placeholder { color: var(--text-muted); }
#stickerSearchInput: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) */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 15px; margin-bottom: 40px; }
/* FILE: css/stickers.css (Replace these two rules) */

.sticker-item {
    border-radius: var(--radius); /* Outer 12px radius */
    overflow: hidden;
    background: var(--panel-light); /* Dark glass background */
    border: 3px solid var(--border-color); /* Subtle outer border */
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    
    /* *** ADDED PADDING: Creates space for the outer glass frame *** */
    padding: 10px; 
    box-sizing: border-box;
}

.sticker-item img {
    /* *** This is now the INNER white square *** */
    width: 100%;            /* Fill the padded area */
    height: 100%;           /* Fill the padded area */
    object-fit: contain;  /* Contain sticker inside this element's padding */
    display: block;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
    pointer-events: auto;
    user-select: none;
    -webkit-user-drag: none;

    /* *** The White Background & Inner Padding *** */
    background-color: white;      /* The white square */
    border-radius: 6px;           /* Inner rounded corner (smaller than parent) */
    padding: 10px;                /* Space between white edge and sticker graphic */
    box-sizing: border-box;       /* Include padding in the 100% width/height */
}

/* --- 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 */
@media (max-width: 768px) {
    .sticker-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
    .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%; }
}
@media (max-width: 480px) {
    .sticker-grid { grid-template-columns: repeat(auto-fit, minmax(85px, 1fr)); gap: 8px; }
    .sticker-item img { max-width: 80%; max-height: 80%; }
    .tab { padding: 8px 15px; font-size: 0.85rem; gap: 8px; }
    .page-link { min-width: 28px; padding: 5px 8px; font-size: 0.85rem;}
    #stickerSearchInput { font-size: 0.9rem; padding: 10px 15px 10px 40px;} .search-icon { left: 15px; font-size: 0.9rem;}
    .vibe-cart-sidebar { width: 260px; }
    .vibe-cart-sidebar h3 { font-size: 1.1rem; }
    .cart-item-img { width: 35px; height: 35px; }
    .cart-item-name { font-size: 0.8rem; }
    .cart-total { font-size: 1rem; }
    .btn-order-cart { font-size: 0.8rem; padding: 8px 15px; }
}