:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    --error-gradient: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    --delete-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --background-light: #f8f9ff;
    --border-color: #e3e8f0;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.file-input {
    display: none;
}
.wrap, .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.products-section {
    padding: 40px 30px;
}
.product-card {
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 25px var(--shadow-light);
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-medium);
}
.product-header {
    display: flex;
    align-items: center;
    padding: 30px;
    background: var(--background-light);
    border-bottom: 2px solid var(--border-color);
}
.product-image {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    margin-right: 25px;
    box-shadow: 0 8px 20px var(--shadow-heavy);
    border: 3px solid white;
    cursor: pointer;
    transition: var(--transition);
}
.product-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px var(--shadow-heavy);
}
.product-info h3 {
    color: var(--text-primary);
    font-size: 1.6rem;
    margin-bottom: 7px;
    font-weight: 700;
}
.product-meta {
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.review-section {
    padding: 35px;
}
.rating-container {
    margin-bottom: 20px;
    text-align: center;
}
.rating-label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.myrm-star-rating {
    display: inline-flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-direction: row-reverse;
    justify-content: center;
}
.myrm-star {
    font-size: 2.8rem;
    color: #ddd;
    cursor: pointer;
    transition: var(--transition);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.myrm-star:hover,
.myrm-star:hover ~ .myrm-star,
.myrm-star.active,
.myrm-star.active ~ .myrm-star {
    color: #ffd700;
    transform: scale(1.15);
    text-shadow: 0 6px 12px rgba(255, 215, 0, 0.4);
}
.myrm-rating-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--background-light);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    margin-top: 10px;
}
.review-textarea {
    width: 100%;
    min-height: 150px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    font-size: 1.1rem;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
    background: #fafbff;
    margin-bottom: 5px;
}
.review-textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.2);
}
.media-section {
    margin-top: 30px;
}
.media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}
.media-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.media-info {
    color: var(--text-secondary);
    font-size: 1rem;
    background: var(--background-light);
    padding: 6px 15px;
    border-radius: 20px;
}
.upload-area {
    border: 2px dashed #4facfe;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, #f8f9ff 0%, #e3e8f0 100%);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.upload-area:hover {
    border-color: var(--text-primary);
    background: linear-gradient(135deg, #e3e8f0 0%, #d1d9e0 100%);
    transform: translateY(-2px);
}
.upload-area.drag-over {
    border-color: #00f2fe;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
}
.upload-icon {
    font-size: 2.5rem;
    color: #4facfe;
    margin-bottom: 10px;
    transition: var(--transition);
}
.upload-area:hover .upload-icon {
    transform: scale(1.1);
    color: var(--text-primary);
}
.upload-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}
.upload-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.media-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 25px;
}
.media-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-heavy);
    aspect-ratio: 1;
    transition: var(--transition);
}
.media-item:hover {
    transform: scale(1.03);
}
.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}
.media-item img:hover,
.media-item video:hover {
    transform: scale(1.05);
}
/* First, find and remove the !important from this section */
#rm-review-form .media-item .media-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #e74c3c;
    border: none;
    border-radius: 50%;
    /* You must remove the !important from these lines */
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}


/* Then, your mobile-specific rule will correctly apply */
@media (max-width: 768px) {
  #rm-review-form  .media-item .media-remove {
        font-size: 1.8rem;
        width: 8px;
        height: 8px;
    }
}
.media-item .media-remove:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.1);
}
.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    border-radius: 16px;
}
.progress-bar {
    width: 80%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 15px;
}
.progress-fill {
    height: 100%;
    background: #4facfe;
    transition: width 0.3s ease;
}
.submit-btn {
    background: var(--card-gradient);
    color: white;
    border: none;
    padding: 16px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
    margin: 25px 15px 15px 0;
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(79, 172, 254, 0.5);
}
.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}
.delete-btn {
    background: var(--delete-gradient);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}
.delete-btn:hover {
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.5);
}
#myrm-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    transform: translateX(120%);
    transition: transform 0.4s ease-in-out;
    padding: 15px 20px;
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}
#myrm-notification.show {
    transform: translateX(0);
}
#myrm-notification.success {
    background-color: #2ecc71;
}
#myrm-notification.error {
    background-color: #e74c3c;
}
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.hidden {
    display: none !important;
}
/* Media Popup Modal */
#myrm-media-popup {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}
#myrm-media-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-popup-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    animation: popupZoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes popupZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.media-popup img,
.media-popup video {
    width: 100%;
    height: auto;
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 20px;
}
.popup-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: white;
    font-size: 3.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-shadow: none;
}
.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
}
.form-group {
    margin-bottom: 25px;
}
.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
}
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}
/* --- Mobile View Adjustments (for screens up to 768px wide) --- */
@media (max-width: 768px) {
  
   
    /* Prevents any content from causing horizontal scrolling */
    body, html {
        overflow-x: hidden !important;
    }
    
    .products-section {
        padding: 0px 0px !important;
    }
    /* Ensures the main container and product card take up the full width */
    .wrap, .container, .product-card {
        width: 100% !important;
        padding: 0 5px !important;
        box-sizing: border-box !important;
    }
    
    /* Ensures all images and videos are responsive and don't overflow */
   .media-item img,
.media-item video  {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Stack the product image and info vertically */
    .product-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    /* Make the product image full-width and remove its margin */
    .product-image {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 20px;
        max-width: 200px;
    }
    
    /* Center the product info text */
    .product-info h3 {
        font-size: 1.4rem;
    }
    .product-meta {
        justify-content: center;
    }
    
    /* Make the media preview a single column to prevent horizontal scroll */
    .media-preview {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-top: 25px !important;
    }

    .media-item {
        width: calc(33.33% - 10px) !important;
        max-width: 120px !important;
        aspect-ratio: 1 / 1;
    }
    
    /* Adjust rating stars and text for smaller screens */
    .myrm-star-rating {
        gap: 8px;
    }
    .myrm-star {
        font-size: 2rem;
    }
    .myrm-rating-text {
        font-size: 1rem;
    }
    
    /* Adjust submit button padding */
    .submit-btn {
        padding: 14px 25px;
        width: 100%;
        margin-right: 0;
    }
    .btn-group {
        flex-direction: column;
    }
}

   #rm-review-form .media-item .media-remove {
        font-size: 1.5rem;
        min-height: revert;
        top: 5px;
        right: 5px;
        padding: 10px;
    }
}