New Widgets: - Brand Grid: Display brands in a grid with product counts - Category List: Show categories in grid/list/pills layouts - Specials Grid: Display products on sale with discount badges Enhanced Product Grid Widget: - Dynamic category dropdown (fetches from API) - Dynamic brand dropdown (fetches from API) - "On Special Only" toggle filter New Plugin Methods: - fetch_categories() - Get categories from API - fetch_brands() - Get brands from API - fetch_specials() - Get products on sale - get_category_options() - Cached options for Elementor - get_brand_options() - Cached options for Elementor 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
496 lines
8.8 KiB
CSS
496 lines
8.8 KiB
CSS
/**
|
|
* CannaIQ Menus - WordPress Plugin Styles
|
|
* v1.5.3
|
|
*/
|
|
|
|
/* Product Grid */
|
|
.cannaiq-product-grid {
|
|
display: grid;
|
|
gap: 24px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.cannaiq-grid-cols-2 {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.cannaiq-grid-cols-3 {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
|
|
.cannaiq-grid-cols-4 {
|
|
grid-template-columns: repeat(4, 1fr);
|
|
}
|
|
|
|
.cannaiq-grid-cols-6 {
|
|
grid-template-columns: repeat(6, 1fr);
|
|
}
|
|
|
|
@media (max-width: 1024px) {
|
|
.cannaiq-grid-cols-4,
|
|
.cannaiq-grid-cols-6 {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.cannaiq-grid-cols-3,
|
|
.cannaiq-grid-cols-4,
|
|
.cannaiq-grid-cols-6 {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.cannaiq-product-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
/* Product Card */
|
|
.cannaiq-product-card {
|
|
background: #fff;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.cannaiq-product-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.cannaiq-product-image {
|
|
width: 100%;
|
|
aspect-ratio: 1;
|
|
overflow: hidden;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.cannaiq-product-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.cannaiq-product-content {
|
|
padding: 16px;
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.cannaiq-product-title {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
margin: 0 0 8px 0;
|
|
color: #333;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.cannaiq-product-brand {
|
|
font-size: 14px;
|
|
color: #666;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.cannaiq-product-description {
|
|
font-size: 14px;
|
|
color: #666;
|
|
line-height: 1.6;
|
|
margin: 0 0 12px 0;
|
|
}
|
|
|
|
.cannaiq-product-meta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
margin: 12px 0;
|
|
}
|
|
|
|
.cannaiq-meta-item {
|
|
font-size: 13px;
|
|
padding: 4px 10px;
|
|
border-radius: 4px;
|
|
background: #f0f0f0;
|
|
}
|
|
|
|
.cannaiq-meta-item strong {
|
|
color: #333;
|
|
}
|
|
|
|
.cannaiq-thc {
|
|
background: #e8f5e9;
|
|
color: #2e7d32;
|
|
}
|
|
|
|
.cannaiq-cbd {
|
|
background: #e3f2fd;
|
|
color: #1565c0;
|
|
}
|
|
|
|
.cannaiq-product-price {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: #2e7d32;
|
|
margin-top: auto;
|
|
padding-top: 12px;
|
|
}
|
|
|
|
.cannaiq-price-sale {
|
|
color: #c62828;
|
|
}
|
|
|
|
.cannaiq-price-regular.cannaiq-strikethrough {
|
|
text-decoration: line-through;
|
|
color: #999;
|
|
font-size: 16px;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.cannaiq-out-of-stock {
|
|
display: inline-block;
|
|
padding: 6px 12px;
|
|
background: #ffebee;
|
|
color: #c62828;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
border-radius: 4px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
/* Single Product */
|
|
.cannaiq-single-product {
|
|
background: #fff;
|
|
border-radius: 8px;
|
|
padding: 24px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.cannaiq-layout-horizontal {
|
|
display: grid;
|
|
grid-template-columns: 400px 1fr;
|
|
gap: 32px;
|
|
}
|
|
|
|
.cannaiq-layout-vertical {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 24px;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.cannaiq-layout-horizontal {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.cannaiq-single-product-image {
|
|
width: 100%;
|
|
aspect-ratio: 1;
|
|
overflow: hidden;
|
|
border-radius: 8px;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.cannaiq-single-product-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.cannaiq-single-product-details {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.cannaiq-single-product-title {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
color: #333;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.cannaiq-single-product-brand {
|
|
font-size: 16px;
|
|
color: #666;
|
|
}
|
|
|
|
.cannaiq-single-product-brand strong {
|
|
color: #333;
|
|
}
|
|
|
|
.cannaiq-single-product-description {
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
color: #555;
|
|
}
|
|
|
|
.cannaiq-single-product-info {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 16px;
|
|
padding: 16px;
|
|
background: #f8f8f8;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.cannaiq-info-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.cannaiq-info-item strong {
|
|
font-size: 14px;
|
|
color: #333;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.cannaiq-info-item span {
|
|
font-size: 16px;
|
|
color: #555;
|
|
}
|
|
|
|
.cannaiq-info-item.cannaiq-terpenes span,
|
|
.cannaiq-info-item.cannaiq-effects span,
|
|
.cannaiq-info-item.cannaiq-flavors span {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.cannaiq-single-product-price {
|
|
font-size: 32px;
|
|
font-weight: 700;
|
|
color: #2e7d32;
|
|
}
|
|
|
|
/* Loading State */
|
|
.cannaiq-loading {
|
|
text-align: center;
|
|
padding: 40px;
|
|
color: #666;
|
|
}
|
|
|
|
.cannaiq-loading:after {
|
|
content: "...";
|
|
animation: cannaiq-dots 1.5s steps(4, end) infinite;
|
|
}
|
|
|
|
@keyframes cannaiq-dots {
|
|
0%, 20% {
|
|
color: rgba(0, 0, 0, 0);
|
|
text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0),
|
|
0.5em 0 0 rgba(0, 0, 0, 0);
|
|
}
|
|
40% {
|
|
color: #666;
|
|
text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0),
|
|
0.5em 0 0 rgba(0, 0, 0, 0);
|
|
}
|
|
60% {
|
|
text-shadow: 0.25em 0 0 #666,
|
|
0.5em 0 0 rgba(0, 0, 0, 0);
|
|
}
|
|
80%, 100% {
|
|
text-shadow: 0.25em 0 0 #666,
|
|
0.5em 0 0 #666;
|
|
}
|
|
}
|
|
|
|
/* Error State */
|
|
.cannaiq-error {
|
|
padding: 16px;
|
|
background: #ffebee;
|
|
color: #c62828;
|
|
border-radius: 4px;
|
|
border-left: 4px solid #c62828;
|
|
}
|
|
|
|
/* ========================================
|
|
Brand Grid Widget
|
|
======================================== */
|
|
.cannaiq-brand-grid {
|
|
display: grid;
|
|
gap: 20px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.cannaiq-brand-card {
|
|
background: #fff;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
text-align: center;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.cannaiq-brand-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.cannaiq-brand-name {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
margin: 0 0 8px 0;
|
|
color: #333;
|
|
}
|
|
|
|
.cannaiq-brand-count {
|
|
font-size: 13px;
|
|
color: #666;
|
|
}
|
|
|
|
/* ========================================
|
|
Category List Widget
|
|
======================================== */
|
|
.cannaiq-category-grid {
|
|
display: grid;
|
|
gap: 16px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.cannaiq-category-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.cannaiq-category-pills {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.cannaiq-category-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
background: #fff;
|
|
border-radius: 8px;
|
|
text-decoration: none;
|
|
color: #333;
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
transition: background 0.2s, transform 0.2s;
|
|
}
|
|
|
|
.cannaiq-category-item:hover {
|
|
background: #f3f4f6;
|
|
transform: translateX(4px);
|
|
}
|
|
|
|
.cannaiq-category-pills-item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 16px;
|
|
background: #f3f4f6;
|
|
border-radius: 20px;
|
|
text-decoration: none;
|
|
color: #333;
|
|
font-size: 14px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.cannaiq-category-pills-item:hover {
|
|
background: #e5e7eb;
|
|
}
|
|
|
|
.cannaiq-category-name {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.cannaiq-category-count {
|
|
font-size: 13px;
|
|
color: #666;
|
|
}
|
|
|
|
/* ========================================
|
|
Specials/Deals Grid Widget
|
|
======================================== */
|
|
.cannaiq-specials-grid {
|
|
display: grid;
|
|
gap: 24px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.cannaiq-special-card {
|
|
background: #fff;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
position: relative;
|
|
}
|
|
|
|
.cannaiq-special-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.cannaiq-discount-badge {
|
|
position: absolute;
|
|
top: 12px;
|
|
right: 12px;
|
|
background: #ef4444;
|
|
color: #fff;
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
padding: 4px 10px;
|
|
border-radius: 4px;
|
|
z-index: 1;
|
|
}
|
|
|
|
.cannaiq-special-image {
|
|
width: 100%;
|
|
aspect-ratio: 1;
|
|
overflow: hidden;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.cannaiq-special-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.cannaiq-special-content {
|
|
padding: 16px;
|
|
}
|
|
|
|
.cannaiq-special-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
margin: 0 0 8px 0;
|
|
color: #333;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.cannaiq-special-price {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.cannaiq-special-price .cannaiq-price-sale {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: #16a34a;
|
|
}
|
|
|
|
.cannaiq-special-price .cannaiq-price-regular {
|
|
font-size: 14px;
|
|
color: #999;
|
|
}
|