/* Global */
body {
    background: #8b0000;
    overflow: hidden;
}  

*, *::before, *::after {
    box-sizing: border-box;
}

img { max-width:100%; }

a {
  -webkit-transition: all 150ms ease;
  -moz-transition: all 150ms ease;
  -ms-transition: all 150ms ease;
  -o-transition: all 150ms ease;
  transition: all 150ms ease; 
  }
    a:hover {
        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* IE 8 */
        filter: alpha(opacity=50); /* IE7 */
        opacity: 0.6;
        text-decoration: none;
    }


/* Container */
.container-fluid {
    background: #FFFFFF;
    margin: 40px auto 10px;
    padding: 20px 40px 0;
    max-width: 1600px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}


/* Page Header */
.page-header {
    background: #f9f9f9;
    margin: -30px -40px 40px;
    padding: 20px 40px;
    border-top: 4px solid #ccc;
    color: #999;
    text-transform: uppercase;
    }
    .page-header h3 {
        line-height: 0.88rem;
        color: #000;
        }



/* Thumbnail Box */
.caption h4 {
    font-size: 1rem;
    color: #444;
    }
    .caption p {
        font-size: 0.75rem;
        color: #999;
        }
        .btn.btn-mini {
            font-size: 0.63rem;
            }


/* Carousel Control */
.control-box {
    text-align: right;
    width: 100%;
    }
    .carousel-control{
        background: #666;
        border: 0px;
        border-radius: 0px;
        display: inline-block;
        font-size: 34px;
        font-weight: 200;
        line-height: 18px;
        opacity: 0.5;
        padding: 4px 10px 0px;
        position: static;
        height: 30px;
        width: 15px;
        }


/* Footer */
.footer {
    margin: auto;
    width: 100%;
    max-width: 960px;
    display: block;
    font-size: 0.69rem;
    }
    .footer, .footer a {
        color: #c9e4f7;
        }
        p.right  { 
            float: right; 
            }


/* Mobile Only */
@media (max-width: 767px) {
    .page-header, .control-box {
    text-align: center;
    } 
}
@media (max-width: 479px) {
    .caption {
    word-break: break-all;
    }
}


category-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.category-title {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.category-products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.category-title {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.card {
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.pdf-download-link {
    display: block;
    position: relative;
}

.pdf-download-link::after {
    content: "⬇️ PDF";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.pdf-download-link:hover::after {
    opacity: 1;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.admin-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.admin-modal-content .form-group {
    margin-bottom: 15px;
}

.admin-modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.admin-modal-content .form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.admin-modal-content .form-control-file {
    width: 100%;
}

.admin-modal-content textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.admin-modal-content .btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.admin-modal-content .btn-primary {
    background-color: #4CAF50;
    color: white;
}

.admin-modal-content .btn-secondary {
    background-color: #ccc;
    color: #333;
}

/* Product Table Styles */
#productTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#productTable th, #productTable td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

#productTable th {
    background-color: #f5f5f5;
}

#productTable img {
    max-width: 50px;
    height: auto;
}

.login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.login-container.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.login-container h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.login-form button {
    background-color: #6e0e0f;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover {
    background-color: #3498db;
}

#adminPanel {
    max-width: 1200px;
    min-width: 80%;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#adminPanel h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.admin-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.add-product-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-product-btn:hover {
    background-color: #2ecc71;
    transform: translateY(-2px);
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 20px;
    table-layout: fixed;
    width: 100%;
}

.product-table th {
    background-color: #3498db;
    color: white;
    padding: 15px;
    text-align: left;
    padding: 20px 18px;
}

.product-table td {
    padding: 20px 18px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: middle;
    color: #000;
}

.product-table tr:hover {
    background-color: #f8f9fa;
}

.product-table img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.product-table th,
.product-table td {
    vertical-align: middle;
    text-align: left;
    overflow-wrap: break-word;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
}

.edit-btn {
    background-color: #3498db;
    color: white;
}

.edit-btn:hover {
    background-color: #2980b9;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.visibility-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.visibility-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.visibility-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.visibility-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .visibility-slider {
    background-color: #27ae60;
}

input:checked + .visibility-slider:before {
    transform: translateX(26px);
}

.product-table th:nth-child(1),
.product-table td:nth-child(1) {
    width: 130px; /* image column */
}

.product-table th:nth-child(2),
.product-table td:nth-child(2) {
    width: 140px; /* name */
}

.product-table th:nth-child(3),
.product-table td:nth-child(3) {
    width: 120px; /* reference */
}

.product-table th:nth-child(4),
.product-table td:nth-child(4) {
    width: 150px; /* category */
}

.product-table th:nth-child(5),
.product-table td:nth-child(5) {
    width: 300px; /* description */
}

.product-table th:nth-child(6),
.product-table td:nth-child(6) {
    width: 100px; /* visibility toggle */
}

.product-table th:nth-child(7),
.product-table td:nth-child(7) {
    width: 180px; /* actions */
}

.product-table-container {
    max-height: 800px; /* or whatever height you prefer */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.product-table thead th {
    position: sticky;
    top: 0;
    background-color: #3498db;
    z-index: 1;
}

.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-in 3s forwards;
}

.error-message i {
    font-size: 18px;
}

@keyframes slideIn {
    from {
        top: -50px;
        opacity: 0;
    }
    to {
        top: 20px;
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ADD-ON
-------------------------------------------------- */
body:after{display:none;content:"less than 320px";font-size:1rem;font-weight:bold;position:fixed;bottom:0;width:100%;text-align:center;background-color:hsla(1,60%,40%,0.7);color:#fff;height:20px;padding-top:0;margin-left:0;left:0}@media only screen and (min-width:320px){body:after{content:"320 to 480px";background-color:hsla(90,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}@media only screen and (min-width:480px){body:after{content:"480 to 768px";background-color:hsla(180,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}@media only screen and (min-width:768px){body:after{content:"768 to 980px";background-color:hsla(270,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}@media only screen and (min-width:980px){body:after{content:"980 to 1024px";background-color:hsla(300,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}@media only screen and (min-width:1024px){body:after{content:"1024 and up";background-color:hsla(360,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}

::selection { background: #ff5e99; color: #FFFFFF; text-shadow: 0; }
::-moz-selection { background: #ff5e99; color: #FFFFFF; }

a, a:focus, a:active, a:hover, object, embed { outline: none; }
:-moz-any-link:focus { outline: none; }
input::-moz-focus-inner { border: 0; }