/* Container & Grid */
.hms-dm-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 20px 0;
}

.hms-dm-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.hms-dm-loading {
    text-align: center;
    width: 100%;
    color: #666;
    font-size: 1.1rem;
}

/* Glassmorphism Panel Base */
.hms-dm-glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Product Cards */
.hms-dm-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.hms-dm-card-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.hms-dm-card-content {
    padding: 20px;
}

.hms-dm-product-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    color: #1d1d1f;
    font-weight: 600;
}

.hms-dm-product-price {
    font-size: 1.1rem;
    color: #86868b;
    margin-bottom: 20px;
}

.hms-dm-product-price del {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-right: 5px;
}

.hms-dm-product-price ins {
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 600;
}

/* Force Button Visibility Setup */
#hms-dm-dining-grid .hms-dm-card-actions {
    display: flex !important;
    flex-direction: row;
    gap: 10px !important;
    margin-top: 15px !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    height: auto !important;
    overflow: visible !important;
}

#hms-dm-dining-grid .hms-dm-card-actions button,
#hms-dm-dining-grid .hms-dm-card-actions a {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
    flex: 1;
}

.hms-dm-btn-view, .hms-dm-btn-cart, .hms-dm-btn-cart-modal {
    flex: 1;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hms-dm-btn-view {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.hms-dm-btn-view:hover {
    background: rgba(0, 0, 0, 0.1);
}

a.hms-dm-btn-cart.button, a.hms-dm-btn-cart-modal.button {
    background: #0071e3 !important;
    color: #fff !important;
    margin: 0;
}

a.hms-dm-btn-cart.button:hover, a.hms-dm-btn-cart-modal.button:hover {
    background: #0077ED !important;
    color: #fff !important;
}

a.hms-dm-btn-cart.button.added::after {
    content: " ✓";
}

.hms-dm-btn-disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    background: #ccc !important;
    color: #fff !important;
}

/* Modal Overlay */
.hms-dm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Content */
.hms-dm-modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
}

.hms-dm-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hms-dm-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1d1d1f;
}

.hms-dm-close-btn {
    font-size: 28px;
    font-weight: bold;
    color: #1d1d1f;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
    transition: opacity 0.2s;
}

.hms-dm-close-btn:hover {
    opacity: 1;
}

.hms-dm-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.hms-dm-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background: rgba(250, 250, 250, 0.5);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    align-items: center;
}

.hms-dm-close-btn-secondary {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.hms-dm-close-btn-secondary:hover {
    background: #f1f1f1;
}

/* Modal Internal Body Content */
.hms-dm-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.hms-dm-modal-img-wrapper {
    position: relative;
}

.hms-dm-modal-img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hms-dm-badge-sale {
    position: absolute;
    top: 10px; left: 10px;
    background: #e30000;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.hms-dm-modal-info h2 {
    margin-top: 0;
    font-size: 1.8rem;
    color: #1d1d1f;
}

.hms-dm-large-price {
    font-size: 1.6rem;
    color: #0071e3;
    margin-bottom: 10px;
}

.hms-dm-modal-price {
    font-size: 1.4rem;
    color: #0071e3;
    font-weight: 600;
    margin-bottom: 20px;
}

.hms-dm-modal-stock {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 20px;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
}

.hms-dm-stock-in {
    background: #e8f5e9;
    color: #2e7d32;
}

.hms-dm-stock-out {
    background: #ffebee;
    color: #c62828;
}

.hms-dm-modal-desc {
    color: #424245;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* CSS Loading Spinner */
.hms-dm-loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #0071e3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: hms-dm-spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes hms-dm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Variation Dropdown Styles */
.hms-dm-variation-dropdown {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 0.9rem;
    color: #1d1d1f;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231d1d1f%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

.hms-dm-variation-dropdown:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.2);
}

/* ==========================================
   FLOATING CART ICON & ANIMATIONS
   ========================================== */
.hms-dm-floating-cart {
    position: fixed;
    top: 25px;
    right: 30px;
    background: #ffffff;
    color: #1d1d1f;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 999998;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    text-decoration: none !important;
}

.hms-dm-floating-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    color: #0071e3;
}

.hms-dm-floating-cart svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
}

.hms-dm-cart-badge {
    position: absolute;
    top: -5px;
    right: -2px;
    background: #e30000;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hms-dm-bounce {
    animation: hms-dm-bounce-anim 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes hms-dm-bounce-anim {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ==========================================
   FILTER & SEARCH BAR
   ========================================== */
.hms-dm-filter-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 15px 20px !important;
    margin-bottom: 30px !important;
    border-radius: 16px !important;
    position: sticky !important;
    top: 20px !important;
    z-index: 100 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 70px !important;
}

.hms-dm-search-wrapper {
    position: relative !important;
    flex: 1 !important;
    min-width: 250px !important;
    display: block !important;
}

.hms-dm-search-icon {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    color: #86868b !important;
}

.hms-dm-search-input {
    width: 100% !important;
    padding: 12px 15px 12px 42px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    color: #1d1d1f !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

.hms-dm-search-input:focus {
    border-color: #0071e3 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15) !important;
    background: #ffffff !important;
}

.hms-dm-category-filters {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    padding-bottom: 5px !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
}

.hms-dm-category-filters::-webkit-scrollbar {
    display: none !important; 
}

.hms-dm-filter-btn {
    padding: 8px 18px !important;
    border-radius: 20px !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid transparent !important;
    color: #424245 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hms-dm-filter-btn:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

.hms-dm-filter-btn.active {
    background: #1d1d1f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
}

/* ==========================================
   SKELETON LOADER ANIMATIONS
   ========================================== */
@keyframes hms-dm-skeleton-pulse {
    0% { background-color: rgba(0, 0, 0, 0.05); }
    50% { background-color: rgba(0, 0, 0, 0.12); }
    100% { background-color: rgba(0, 0, 0, 0.05); }
}

.hms-dm-skeleton {
    animation: hms-dm-skeleton-pulse 1.5s infinite ease-in-out;
    border-radius: 8px;
}

.hms-dm-skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
}

.hms-dm-skeleton-img {
    width: 100%;
    height: 350px;
    border-radius: 12px;
}

.hms-dm-skeleton-title {
    width: 70%;
    height: 32px;
    margin-bottom: 20px;
}

.hms-dm-skeleton-price {
    width: 30%;
    height: 28px;
    margin-bottom: 30px;
}

.hms-dm-skeleton-text {
    width: 100%;
    height: 16px;
    margin-bottom: 12px;
}

.hms-dm-skeleton-text.short {
    width: 80%;
}

.hms-dm-skeleton-options {
    margin-top: 30px;
    width: 100%;
    height: 60px;
    border-radius: 12px;
}

.hms-dm-skeleton-card {
    display: flex;
    flex-direction: column;
}

.hms-dm-skeleton-card-img {
    width: 100%;
    height: 220px;
    border-radius: 0;
}

.hms-dm-skeleton-card-content {
    padding: 20px;
    flex: 1;
}

.hms-dm-skeleton-card-title {
    width: 75%;
    height: 22px;
    margin-bottom: 12px;
}

.hms-dm-skeleton-card-price {
    width: 40%;
    height: 18px;
    margin-bottom: 25px;
}

.hms-dm-skeleton-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.hms-dm-skeleton-card-btn {
    flex: 1;
    height: 40px;
    border-radius: 8px;
}

/* ==========================================
   ROOM STATUS BANNER
   ========================================== */
.hms-dm-room-status-banner {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hms-dm-banner-message {
    color: #1d1d1f;
    font-size: 1rem;
    display: flex;
    align-items: center;
    width: 100%;
}

.hms-dm-banner-message a {
    color: #0071e3;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    margin-right: 5px;
}

.hms-dm-banner-message a:hover {
    text-decoration: underline;
}

.hms-dm-banner-warning {
    color: #c62828; 
}

.hms-dm-room-dropdown {
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1d1d1f;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    flex-grow: 1;
    max-width: 300px;
}

.hms-dm-room-dropdown:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hms-dm-modal-grid { grid-template-columns: 1fr; }
    .hms-dm-skeleton-grid { grid-template-columns: 1fr; }
    .hms-dm-skeleton-img { height: 250px; }
    .hms-dm-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
        padding: 15px !important;
    }
}